Manually delete Oracle 10g em
You can use emca to manually configure em!
There is a major link in the EM configuration process:
Whether dbca or emca-deconfig dbcontrol DB-repos drop is used, the database deletion may fail,
In this way, errors will occur when the database is created again (detailed records are displayed in the log). Therefore, it is best to use
You can manually delete a file by using the following command:
Drop public synonym setemviewusercontext;
Drop public synonym mgmt_target_blackouts;
Drop role mgmt_user;
Drop user mgmt_view cascade;
Drop user sysman cascade;
C:> emca-deconfig dbcontrol DB-repos drop
Emca starts at 13:00:27
Em configuration assistant 10.2.0.1.0 official version
Copyright (c) 2003,200 5, Oracle. All rights reserved.
Enter the following information:
Database Sid: orcl
Listener port: 1521
Sys user password:
Password of the sysman User:
Password of the sysman User:
Continue? [Yes (y)/NO (n)]: Y
13:00:51 oracle. sysman. emcp. emconfig perform
Information: The operation is being recorded to E: oracleproduct10.2.0db _ 1 Export toollogsemcaorclemc
A_2008-08-31_01-00-27-Afternoon. log.
13:00:52 oracle. sysman. emcp. util. dbcontrolutil stopoms
Information: The Database Control is being stopped (this operation may take some time )...
13:00:58 oracle. sysman. emcp. emreposconfig droprepository
Information: deleting the EM archives. This operation may take some time )...
13:05:11 oracle. sysman. emcp. emreposconfig invoke
Information: The archive has been deleted successfully.
13:05:16 oracle. sysman. emcp. emagentconfig configure mdeconfiguration
Severe: An error occurred while canceling the EM configuration of the database orcl.
13:05:16 oracle. sysman. emcp. emconfig perform
Severe: An error occurred while canceling the EM configuration of the database orcl.
For more information, see E: oracleproduct10.2.0db _ 1?toollogsemcaorclemca_20
08-08-31_01-00-27-log file in. log.
Configuration cannot be completed. For more information, see E: oracleproduct10.2.0db _ 1 Export toollogsem
Caorclemca_2008-08-31_01-00-27-log files in afternoon. log.
C:> sqlplus/As sysdba
SQL * Plus: Release 10.2.0.1.0-production on Sunday August 31 13:05:56 2008
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connect:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the partitioning, OLAP and Data Mining options
SQL> drop public synonym setemviewusercontext;
The synonym has been deleted.
SQL> drop public synonym mgmt_target_blackouts;
The synonym has been deleted.
SQL> drop role mgmt_user;
The role has been deleted.
SQL> drop user sysman cascade;
The user has been deleted.
SQL> drop user mgmt_view cascade;
The user has been deleted.
SQL> exit
From Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the partitioning, OLAP and Data Mining options disconnected
C:> emca-config dbcontrol DB-repos create
Emca starts at 13:18:02
Em configuration assistant 10.2.0.1.0 official version
Copyright (c) 2003,200 5, Oracle. All rights reserved.
Enter the following information:
Database Sid: orcl
Listener port: 1521
Sys user password:
Dbsnmp user password:
Sysman user's password: Y
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: oracleproduct10.2.0db _ 1
Database Host Name...
Listener port number ...... 1521
Database Sid ...... orcl
Email Address of the notification ...............
Notification sending (SMTP) server ...............
-----------------------------------------------------------------
Continue? [Yes (y)/NO (n)]: Y
13:18:41 oracle. sysman. emcp. emconfig perform
Information: The operation is being recorded to E: oracleproduct10.2.0db _ 1 Export toollogsemcaorclemc
A_2008-08-31_01-18-02-Afternoon. log.
13:18:44 oracle. sysman. emcp. emreposconfig createrepository
Information: creating the EM archives (this operation may take some time )...
13:26:56 oracle. sysman. emcp. emreposconfig invoke
Information: You have created a Data Archiving database.
13:27:16 oracle. sysman. emcp. emconfig perform
Severe: The Database Control cannot be started. The following port has been used: [em proxy port: 3938].
For more information, see E: oracleproduct10.2.0db _ 1?toollogsemcaorclemca_20
08-08-31_01-18-02-log file in. log.
Configuration cannot be completed. For more information, see E: oracleproduct10.2.0db _ 1 Export toollogsem
Caorclemca_2008-08-31_01-18-02-log files in afternoon. log.
The preceding figure shows "[em proxy port: 3938]". You cannot start Database Control. After restarting dbconsole, you will find no problem.
.
-- ====================================
C:> emctl stop dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996,200 5 Oracle Corporation. All rights reserved.
Http: // xys: 1158/EM/console/aboutapplication
Oracledbconsoleorcl service is stopping ........
The oracledbconsoleorcl service has been stopped successfully.
C:> emctl start dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996,200 5 Oracle Corporation. All rights reserved.
Http: // xys: 1158/EM/console/aboutapplication
Starting Oracle Enterprise Manager 10g Database Control... oracledbconsoleorcl
The service is starting .................
The oracledbconsoleorcl service has been started successfully.
C:> emctl status dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996,200 5 Oracle Corporation. All rights reserved.
Http: // xys: 1158/EM/console/aboutapplication
Oracle Enterprise Manager 10g is not running.
------------------------------------------------------------------
Logs are generated in directory e: oracleproduct10.2.0db _ 1/xys_orcl/sysman/Lo
G
C:>
---------------------
######################################## ######################################## ####
Manual creation of Oracle 10g em
C:/Documents and Settings/Administrator> emca-config dbcontrol DB-repos create
Emca started at 16:56:32
Em configuration assistant 10.2.0.1.0 official version
Copyright (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 .............. D:/Oracle/product/10.2.0/db_1
Database Host Name ...... perfect
Listener port number ...... 1521
Database Sid ...... orcl
Email Address of the notification ...............
Notification sending (SMTP) server ...............
-----------------------------------------------------------------
Continue? [Yes (y)/NO (n)]: Y
2009-4-1 16:57:17 oracle. sysman. emcp. emconfig perform
Information: The operation is being recorded to D:/Oracle/product/10.2.0/db_1/export toollogs/emca/orcl/EMC
A_2009-04-01_04-56-32-Afternoon. log.
2009-4-1 16:57:18 oracle. sysman. emcp. util. dbcontrolutil stopoms
Information: The Database Control is being stopped (this operation may take some time )...
2009-4-1 16:57:21 oracle. sysman. emcp. emreposconfig createrepository
Information: creating the EM archives (this operation may take some time )...
2009-4-1 16:58:56 oracle. sysman. emcp. emreposconfig invoke
Information: You have created a Data Archiving database.
2009-4-1 16:59:04 oracle. sysman. emcp. util. dbcontrolutil startoms
Information: Starting Database Control (this operation may take some time )...
16:59:44 oracle. sysman. emcp. emdbpostconfig configure mconfiguration
Information: The Database Control has been started successfully.
16:59:44 oracle. sysman. emcp. emdbpostconfig configure mconfiguration
Warning: The Database Control shortcut cannot be created.
16:59:44 oracle. sysman. emcp. emdbpostconfig configure mconfiguration
Information: >>>>>>>>>> Database Control URL is http: // perfect: 5500/EM <
The Enterprise Manager configuration has been completed successfully.
Emca ended at 16:59:44
---------------------