ERROR: ENVIRONMENT VARIABLE ORACLE_UNQNAME NOT DEFINED. PLEASE SET ORACLE_UNQNAME TO DATABASE UNIQUE NAME

I have starting EM cosole.
emctl status dbconsole
Error: Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.
Solution:
sqlplus / as sysdba;
SQL> SELECT name, db_unique_name FROM v$database;   
NAME      DB_UNIQUE_NAME                            
--------- ------------------------------            
AZDB    AZDB                                    
SQL> exit
bash-3.2$ export ORACLE_UNQNAME=AZDB
Bash-3.2$ echo $ORACLE_UNQNAME
AZDB
bash-3.2$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0                                 
Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.                                 
https://azdb1:1158/em/console/aboutApplication                                                  
Oracle Enterprise Manager 11g is not running.                                                     
bash-3.2$                
bash-3.2$ emctl start dbconsole                                                                   
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0                                  
Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.                                
https://azdb1:1158/em/console/aboutApplication                                                  
Starting Oracle Enterprise Manager 11g Database Control ....... started.                          
------------------------------------------------------------------                                
Logs are generated in directory /u01/app/oracle/product/11.2.0/db_1/azdb1_AZDB/sysman/log
Advertisements
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: