Environment variable ORACLE_UNQNAME not defined

Hello, great Xia. When I first started learning Oracle, I encountered the following series of mistakes when watching two day DBA. I also hope to give some advice on how to solve them

emctl start dbconsole

Error:

Environment variable ORACLE_ UNQNAME not defined. Please set ORACLE_ UNQNAME to da

tabase unique name.

Online solutions:

Environment variable ORACLE_ UNQNAME not defined. Please set ORACLE_ Unqname to database unique name~

C:\> sqlplus /nolog

SQL * Plus: release 11.2.0.1.0 production on Tuesday, November 1, 10:3

Copyright (c) 1982, 2010, Oracle. All rights reserved.

SQL> conn sys/admin as sysdba

Connected

SQL> alter user dbsnmp identified by admin; /// Here, set the password of dbsnmp to admin

The user has changed

SQL> drop role MGMT_ USER;

The role has been deleted

SQL> drop user MGMT_ VIEW cascade;

The user has been deleted

SQL> drop user sysman cascade;

The user has been deleted

SQL> drop PUBLIC SYNONYM MGMT_ TARGET_ BLACKOUTS;

Synonyms deleted

SQL> drop public synonym SETEMVIEWUSERCONTEXT;

Synonyms deleted

SQL> $ emca -config dbcontrol db -repos create

EMCA started at 11:15:57 on November 1, 2011

EM configuration assistant, 11.2.0.0.2

Copyright (c) 2003, 2005, Oracle. All rights reserved

Enter the following information:

Database Sid: odsexdb

Database control is configured for database odsexdb

You have chosen to configure database control to manage the database odsexdb

This will remove the existing configuration and default settings and re perform the configuration

Continue[ Yes/no]: y

Monitor Oracle_ HOME [ D:\app\Administrator\product\11.2.0\dbhome_ 1 ]: 1521

Password of sys user:

Password of dbsnmp user:

Password of SysMan user:

Email address for notification (optional)

Outgoing (SMTP) server for notifications (optional)

—————————————————————–

The following settings have been specified

Database Oracle_ HOME ……………. D:\app\Administrator\product\11.2.0\dbhome_ 1

Local host name……… 76481-640

Monitor Oracle_ HOME ……………. 1521

Listener port number…… 1521

Database Sid………. odsexdb

Email address for notification

Notification outgoing (SMTP) server

—————————————————————–

Continue[ Yes/no]: y

2011-11-1 13:13:06 oracle.sysman.emcp.EMConfig perform

Info: this operation is being logged to D:: (APP/administrator/cfgtoollogs/EMCA/odsexdb/EMCA)_ 2011_ 11_ 01_ 13_ 12_ 31.log

2011-11-1 13:13:08 oracle.sysman.emcp.EMReposConfig createRepository

Info: creating EM data archive (this operation may take a while)

2011-11-1 13:28:25 oracle.sysman.emcp.EMReposConfig invoke

Info: Data Archive created successfully

2011-11-1 13:28:42 oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository

Info: uploading configuration data to EM Archive (this may take a while)

2011-11-1 13:31:38 oracle.sysman.emcp.EMReposConfig invoke

Info: configuration data uploaded successfully

2011-11-1 13:31:45 oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib

Info: the software library has been configured successfully

2011-11-1 13:31:45 oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary

Info: deploying provisioning file

2011-11-1 13:31:56 oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary

Info: the pre configuration file is deployed successfully

2011-11-1 13:31:56 oracle.sysman.emcp.util.DBControlUtil secureDBConsole

Info: protecting database control (this operation may take a while)

2011-11-1 13:32:10 oracle.sysman.emcp.util.DBControlUtil secureDBConsole

Info: database control has been successfully protected

2011-11-1 13:32:10 oracle.sysman.emcp.util.DBControlUtil startOMS

Info: starting database control (this operation may take a while)

2011-11-1 13:35:36 oracle.sysman.emcp.EMDBPostConfig performConfiguration

Info: database control started successfully

Environment variable ORACLE_ UNQNAME not defined. Please set ORACLE_ UNQNAME to database unique name.

Solutions~~

2011-11-1 13:35:37 oracle.sysman.emcp.EMDBPostConfig performConfiguration

Information: & gt>>>>>>>>>> The database control URL is https://76481-640 :5500/em <& lt;& lt;& lt;& lt;& lt;& lt;& lt;& lt;& lt;& lt;

2011-11-1 13:35:51 oracle.sysman.emcp.EMDBPostConfig invoke

Warning:

************************ WARNING ************************

The management data archive is placed in secure mode, in which enterprise manager data is encrypted. The encryption key has been placed in the file

D:/app/Administrator/product/11.2.0/dbhome_ 1/76481-640_ Odsexdb/SysMan/config/emkey.ora. Please be sure to have it

Copy this file, because if this file is lost, the encrypted data will not be available

***********************************************************

Configuration of enterprise manager completed successfully

EMCA ended at 11-1-2011 13:35:51

Error after attempt:

—————————————————————–

Continue[ Yes/no]: y

2013-6-28 20:15:10 oracle.sysman.emcp.EMConfig perform

Info: this operation is being logged to e:: (APP/administrator/cfgtoollogs/EMCA/database)_ TIM\emca

_ 2013_ 06_ 28_ 20_ 13_ 46.log。

2013-6-28 20:15:23 oracle.sysman.emcp.util.DBControlUtil stopOMS

Info: stopping database control (this operation may take a while)

2013-6-28 20:15:27 oracle.sysman.emcp.EMReposConfig createRepository

Info: creating EM data archive (this operation may take a while)

2013-6-28 20:18:06 oracle.sysman.emcp.EMReposConfig invoke

Critical: error creating data archive

2013-6-28 20:18:06 oracle.sysman.emcp.EMReposConfig invoke

Info: for more information, see e:// APP/administrator/cfgtoollogs/EMCA/database_ TIM\em

ca_ repos_ create_& lt; Date & gt Log file in log

2013-6-28 20:18:06 oracle.sysman.emcp.EMConfig perform

Critical: error creating data archive

For more information, please refer to e:// APP/administrator/cfgtoollogs/EMCA/database_ TIM\emca_ 201

3_ 06_ 28_ 20_ 13_ 46. Log

Unable to complete configuration. For more information, please refer to e:// APP/administrator/cfgtoollogs/EMCA/databa

se_ TIM\emca_ 2013_ 06_ 28_ 20_ 13_ 46. Log

E:\app\Administrator\cfgtoollogs\emca\database_ TIM\emca_ 2013_ 06_ 28_ 20_ 13_ Log file connection in 46. Log. http://blog.sina.com.cn/s/blog_ c2e4ec450101ka89.html

Online solutions:

In listener.ora, change to:

(ADDRESS =(PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

Set environment variable in CMD (Note: copydb is the name of Oracle instance)

set ORACLE_ HOSTNAME=localhost set oracle_ sid=copydb set ORACLE_ Unqname = copydb restart listener lsnrctl start to register the database service alter system register in sqlplus; View EM status: emctl status dbconsole. If it is not opened, start em: emctl start dbconsole https://127.0.0.1 : 1158/em

Still report error:

emctl status dbconsole

Environment variable ORACLE_ UNQNAME not defined. Please set ORACLE_ UNQNAME to da

tabase unique name.

Similar Posts: