emctl status dbconsole command gives error “Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name”. How to fix this error? Add environment variable.
Go to Start > Control Panel > System
On the left press Advanced System Options
Go to Environment Variables…
Pres New…
Enter Variable name “ORACLE_UNQNAME” and Variable value “orcl”. Variable value you can find in Control Panel > Services list. Find service OracleServiceXXX, where suffix XXX is your Oracle service name. This suffix goes as environment variable value.
In New System Variable dialog box press OK. In Environment variables window press OK. In System Properties window press OK. Close System window in Control Panel.
Start command window again and enter command
echo %ORACLE_UNQNAME%
Output line should show
ORCL