Hello everyone:
In the last three days, I have been studying the problem that Oracle's Enterprise Manager cannot log on and finally solved the problem. I will share my ideas on how to solve the problem, just to make others less detours.
Problem description:
1. After Entering https: // localhost: 1158/EM/in the address bar, no response has been made.
2. on the console:
C: \> emctl status dbconsole
Environment Variable oracle_unqname not defined. Please set oracle_unqname to database unique name
This is my solution:
Microsoft Windows [version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C: \ windows \ system32> emctl status dbconsole
Environment Variable oracle_unqname not defined. Please set oracle_unqname to DA
Tabase unique name.
C: \ windows \ system32> set oracle_unqname = Chong (Note: My database instance name is Chong)
C: \ windows \ system32> emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996,201 0 Oracle Corporation. All rights reserved.
Https: // localhost: 1158/EM/console/aboutapplication
Oracle Enterprise Manager 11g is not running.
C: \ windows \ system32> emca-config dbcontrol DB
Emca started at 9:59:45
Em configuration assistant, 11.2.0.0.2 official version
Copyright (c) 2003,200 5, Oracle. All rights reserved.
Enter the following information:
Database Sid: Chong
You have configured Database Control for database Chong.
You have chosen to configure Database Control to manage the database Chong
This operation will remove the existing configuration and default settings, and re-execute the configuration
Continue? [Yes (y)/NO (n)]: Y
The listener ORACLE_HOME [D: \ app \ Chong \ product \ 11.2.0 \ dbhome_1]:
Sys user password:
Dbsnmp user password:
Password of the sysman User:
Email Address of the notification (optional ):
Notification sending (SMTP) server (optional ):
-----------------------------------------------------------------
The following settings have been specified:
Database ORACLE_HOME ...... D: \ app \ Chong \ product \ 11.2.0 \ dbhome_1
Local host name...
Listening program ORACLE_HOME ...... D: \ app \ Chong \ product \ 11.2.0 \ dbhome_1
Listener port number ...... 1521
Database Sid ...... Chong
Email Address of the notification ...............
Notification sending (SMTP) server ...............
-----------------------------------------------------------------
Continue? [Yes (y)/NO (n)]: Y
10:00:30 oracle. sysman. emcp. emconfig perform
Information: The operation is logged to D: \ app \ Chong \ export toollogs \ emca \ Chong \ emca_2013_07_09_09 _
59_45.log.
10:00:32 oracle. sysman. emcp. util. portmanager isportinuse
Warning the specified port 5540 is in use.
10:00:32 oracle. sysman. emcp. util. portmanager isportinuse
Warning the specified port 5520 is in use.
10:00:32 oracle. sysman. emcp. util. portmanager isportinuse
Warning the specified port 1158 is in use.
10:00:32 oracle. sysman. emcp. util. dbcontrolutil stopoms
Information: The Database Control is being stopped (this operation may take some time )...
10:01:16 oracle. sysman. emcp. emreposconfig uploadconfigdatatorepository
Information: The configuration data is being uploaded to the EM archives (this operation may take some time )...
10:02:26 oracle. sysman. emcp. emreposconfig invoke
Information: configuration data has been uploaded successfully.
10:02:35 oracle. sysman. emcp. util. dbcontrolutil configuresoftwarelib
Information: The software library has been configured successfully.
10:02:35 oracle. sysman. emcp. emdbpostconfig configuresoftwarelibrary
Information: deploying the pre-configuration file...
10:03:28 oracle. sysman. emcp. emdbpostconfig configuresoftwarelibrary
Information: The pre-configuration file is successfully deployed.
10:03:28 oracle. sysman. emcp. util. dbcontrolutil securedbconsole
Information: Protecting Database Control (this operation may take some time )...
10:03:41 oracle. sysman. emcp. util. dbcontrolutil securedbconsole
Information: The Database Control is successfully protected.
10:03:41 oracle. sysman. emcp. util. dbcontrolutil startoms
Information: Starting Database Control (this operation may take some time )...
10:27:59 oracle. sysman. emcp. emdbpostconfig configure mconfiguration
Information: >>>>>>>>>> Database Control URL is https: // Lenovo-zxc: 1158/EM <
10:28:02 oracle. sysman. emcp. emdbpostconfig invoke
Warning:
* *********************** Warning *************** *********
The management archive has been placed in security mode, in which enterprise manager data is encrypted.
The encryption key has been placed in file D:/APP/Chong/product/11.2.0/dbhome_1/lenovo-zxc_chong/sysma
N/config/emkey. ora. Make sure to back up this file because encrypted data will not be available if this file is lost
.
**************************************** *******************
10:28:02 oracle. sysman. emcp. emdbpostconfig invoke
Warning: An error occurred while starting Database Control. Run the following command.
1) set the environment variable oracle_unqname to the unique name of the database.
2) D: \ app \ Chong \ product \ 11.2.0 \ dbhome_1 \ bin \ emctl. bat start dbconsole
An error occurred while starting Database Control. Run the following command.
1) set the environment variable oracle_unqname to the unique name of the database.
2) D: \ app \ Chong \ product \ 11.2.0 \ dbhome_1 \ bin \ emctl. bat start dbconsole
C: \ windows \ system32> D: \ app \ Chong \ product \ 11.2.0 \ dbhome_1 \ bin \ emctl. bat start DB
Console
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996,201 0 Oracle Corporation. All rights reserved.
Https: // Lenovo-zxc: 1158/EM/console/aboutapplication
Starting Oracle Enterprise Manager 11g Database Control... oracledbconsolechong
The service is starting ..................................... ..............................
........................................ ........................................
........................................ ........................................
........................................ ........................................
........................................ ........................................
........................................ ........................................
........................................ .................
The oracledbconsolechong service cannot be started.
Specific service error: 1.
Type net helpmsg 3547 for more help.
C: \ windows \ system32> net helpmsg 3547
Specific service error :***.
At this point, I was speechless. What should I do? Is this a permission issue?
Run cmd as Administrator
C: \ windows \ system32> emctl stop dbconsole
Environment Variable oracle_unqname not defined. Please set oracle_unqname to DA
Tabase unique name.
C: \ windows \ system32> set oracle_hostname = localhost
C: \ windows \ system32> set oracle_unqname = Chong
C: \ windows \ system32> emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996,201 0 Oracle Corporation. All rights reserved.
Https: // localhost: 1158/EM/console/aboutapplication
Oracle Enterprise Manager 11g is not running.
------------------------------------------------------------------
Logs are generated in Directory D: \ app \ Chong \ product \ 11.2.0 \ dbhome_1/localhost_c
Hong/sysman/log
C: \ windows \ system32> set oracle_hostname = Lenovo-zxc (Note: The name of my computer is Lenovo-zxc)
C: \ windows \ system32> set oracle_unqname = Chong
C: \ windows \ system32> emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996,201 0 Oracle Corporation. All rights reserved.
Https: // Lenovo-zxc: 1158/EM/console/aboutapplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in Directory D: \ app \ Chong \ product \ 11.2.0 \ dbhome_1/Lenovo-zxc _
Chong/sysman/log
In this case, you can connect to the Enterprise Manager, indicating that the database host name is not set correctly.
Note: oracle_hostname must be set to the name of the local computer, and then oracle_unqname is set to the name of the local database.