Http://blog.sina.com.cn/s/blog_7c855cf70100shrv.html
Oracle 11g and EM cannot be started. It may be because the IP address has changed. So I used the emca command to reconfigure Oracle em. The specific process is as follows:
I: \ Documents ents and Settings \ geshaoqing> emca-config dbcontrol DB-repos recreate
Emca started at 11:16:40
Em configuration assistant 10.2.0.1.0 official version
Copyright All (c) 2003,200 5, Oracle. All rights reserved.
Enter the following information:
Database Sid: orcl
Database Control configured for database orcl
You have chosen to configure Database Control to manage the database orcl
This operation will remove the existing configuration and default settings, and re-execute the configuration
Continue? [Yes (y)/NO (n)]: Y
Listener port: 1521
Sys user password:
Dbsnmp user password:
Password of the sysman User:
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 ...... E: \ oracle \ product \ 10.2.0 \ db_1
Data Database Host Name ...... hailang.mshome.net
Listener port number ...... 1521
Database Sid ...... orcl
Email Address of the notification ...............
Notification sending (SMTP) server ...............
-----------------------------------------------------------------
Are you sure you want to continue? [Yes (y)/NO (n)]: Y
2007-10-12 11:17:32 oracle. sysman. emcp. emconfig perform
Information: The operation is logged to E: \ oracle \ product \ 10.2.0 \ db_1 \ export toollogs \ emca \ orcl \ emca_2007-
2007-10-12 11:17:37 oracle. sysman. emcp. util. dbcontrolutil stopoms
Information: The Database Control is being stopped (this operation may take some time )...
2007-10-12 11:17:40 oracle. sysman. emcp. emreposconfig droprepository
Information: deleting the EM archives. This operation may take some time )...
2007-10-12 11:24:23 oracle. sysman. emcp. emreposconfig invoke
Information: The archive has been deleted successfully.
2007-10-12 11:24:24 oracle. sysman. emcp. emreposconfig createrepository
Information: creating the EM archives (this operation may take some time )...
2007-10-12 11:34:36 oracle. sysman. emcp. emreposconfig invoke
Information: You have created a Data Archiving database.
2007-10-12 11:35:15 oracle. sysman. emcp. util. dbcontrolutil startoms
Information: Starting Database Control (this operation may take some time )...
11:36:56 oracle. sysman. emcp. emdbpostconfig configure mconfiguration
Information: The Database Control has been started successfully.
11:36:56 oracle. sysman. emcp. emdbpostconfig configure mconfiguration
Warning: The Database Control shortcut cannot be created.
11:36:56 oracle. sysman. emcp. emdbpostconfig configure mconfiguration
Information: >>>>>>>>>> Database Control URL for http://hailang.mshome.net: 5500/EM <
The Enterprise Manager configuration has been completed successfully.
In 10 Gb, we may often encounter OEM problems that cannot be used normally, but the causes are different. In the end, most problems can be solved through the emca command, for more information, see the connection help. Below are some common commands and instance steps.
Create an EM Database
Emca-repos create
Rebuilding an EM Database
Emca-repos recreate
Delete An EM Database
Emca-repos drop
Configure Database Control for the database
Emca-config dbcontrol DB
Delete Database Control Configuration of a Database
Emca-deconfig dbcontrol DB
Reconfigure the Database Control port. The default port is 1158.
Emca-reconfig ports
Emca-reconfig ports-dbcontrol_http_port 1160
Emca-reconfig ports-agent_port 3940
Set the oracle_sid environment variable and start the EM console service.
Emctl start dbconsole
Set the oracle_sid environment variable and stop the EM console service.
Emctl stop dbconsole
Set the oracle_sid environment variable to view the EM console service status.
Emctl status dbconsole
Steps for configuring dbconsole
Emca-repos create
Emca-config dbcontrol DB
Emctl start dbconsole
To reconfigure dbconsole
Emca-repos drop
Emca-repos create
Emca-config dbcontrol DB
Emctl start dbconsole
It's not good:
SQL> drop user sysman cascade;
User dropped.
SQL>
SQL> drop role mgmt_user;
Role dropped.
SQL> drop user mgmt_view cascade;
User dropped.
SQL> drop public synonym mgmt_target_blackouts;
Synonym dropped.
SQL> drop public synonym setemviewusercontext;
Synonym dropped.
Other problems:
Severe: The Listener is not started or the database service is not registered with the listener. Start the listener and register the database service, and then run em configuration assistant again.
For more information, see log files in D: \ oracle \ export toollogs \ dbca \ orcl \ emconfig. log.
15:17:21 oracle. sysman. emcp. emconfig perform
Configuration: stack trace:
Oracle. sysman. emcp. Exception. emconfigexception: The Listener is not started or the database service is not registered with the listener. Start the listener and register the database service, and then run em configuration assistant again.
At oracle. sysman. emcp. paramsmanager. checklistenerstatusfordbcontrol (paramsmanager. Java: 3245)
At oracle. sysman. emcp. emreposconfig. unlockmgmtaccount (emreposconfig. Java: 1001)
After careful research, we found that the following hostname is used in emconfig. log:
Configuration: connectdesc: (description = (address_list = (address = (Protocol = TCP) (host = blueaeri-PC) (Port = 1521 ))) (CONNECT_DATA = (SERVICE_NAME = orcl )))
But in listener. ora, it is like this:
(Address = (Protocol = TCP) (host = localhost) (Port = 1521 ))
Obviously, blueaeri-PC cannot access localhost, so there are two solutions:
1. Applicable to standalone users: add the OS environment variable oracle_hostname = localhost
2. SERVER: Add a listener for blueaeri-PC or IP address in listener. ora.
Prompt: the following error will still be reported in emconfig. log, but ignore it:
Configuration: the value of oracle_hostname is not set.
The initial password of the sysman account is oem_temp.
If Oracle. sysman fails
A. Drop user sysman cascade;
B. Drop role mgmt_user;
C. Drop user mgmt_view cascade;
D. Drop public synonym mgmt_target_blackouts;
E. Drop public synonym setemviewusercontext;
F. emca-config dbcontrol DB-repos create
C: \ Documents ents and Settings \ Gaoyang> sqlplus/As sysdba
SQL * Plus: Release 10.2.0.1.0-production on Wed May 6 09:29:31 2009
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the partitioning, OLAP and Data Mining options
SQL> drop user sysman cascade;
User dropped.
SQL> drop role mgmt_user;
Role dropped.
SQL> drop user mgmt_view cascade;
User dropped.
SQL> drop public synonym mgmt_target_blackouts;
Synonym dropped.
SQL> drop public synonym setemviewusercontext;
Synonym dropped.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release
10.2.0.1.0-Pr
Oduction
With the partitioning, OLAP and Data Mining options
C: \ Documents ents and Settings \ Gaoyang> emca-config dbcontrol DB-Repos
Create
An error is reported in the following command: Enter the prompt in the specified directory.
Clip, only one similar,
CP-R is a prompt folder. Run emctl start dbconsole again.
View the current status: emctl status dbconsole
You can view the file $ ORACLE_HOME/install/portlist. ini on the port number.