EM database reconstruction manual deletion of Database
Because the original database has been deleted, you need to use the listener when redoing the oem. At this time, the following error is reported:
[Oracle @ localhost ~] $ Emca-repos recreate
Jul 30,201 4 7:15:53 PM oracle. sysman. emcp. EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while )...
Jul 30,201 4 7:15:54 oracle. sysman. emcp. util. PlatformInterface executeCommand
WARNING: Error executing/u01/app/oracle/10.2.0/db_1/sysman/admin/emdrep/bin/RepManager-connect (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521) (CONNECT_DATA = (SERVICE_NAME = orcl_asm ))) -repos_user SYSMAN-action drop-verbose-output_file/u01/app/oracle/10.2.0/db_1/export toollogs/emca/orcl_asm/emca_repos_drop_2014-07-30_07-15-53-PM.log
The system prompts that the listener cannot be found, but the listener does exist.
[Oracle @ localhost ~] $ Lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0-Production on 30-JUL-2014 19:40:45
Copyright (c) 1991,200 5, Oracle. All rights reserved.
Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.37.44.111) (PORT = 1521 )))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0-Production
Start Date 30-JUL-2014 19:15:14
Uptime 0 days 0 hr. 25 min. 31 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File/u01/app/oracle/10.2.0/db_1/network/admin/listener. ora
Listener Log File/u01/app/oracle/10.2.0/db_1/network/log/listener. log
Listening Endpoints Summary...
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 10.37.44.111) (PORT = 1521 )))
Services Summary...
Service "orclasm" has 1 instance (s ).
Instance "orclasm", status UNKNOWN, has 1 handler (s) for this service...
The command completed successfully
Simply create a new oem
[Oracle @ localhost ~] $ Emca-repos create
Started emca at Jul 30,201 4 7:22:28
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003,200 5, Oracle. All rights reserved.
Enter the following information:
Database SID: orclasm
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [Yes (Y)/no (N)]: Y
Jul 30,201 4 7:22:37 oracle. sysman. emcp. EMConfig perform
INFO: This operation is being logged at/u01/app/oracle/10.2.0/db_1/export toollogs/emca/orcl_asm/emca_2014-07-30_07-22-28-PM.log.
Jul 30,201 4 7:22:37 PM oracle. sysman. emcp. EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while )...
Jul 30,201 4 7:22:37 oracle. sysman. emcp. EMReposConfig invoke
SEVERE: Error creating the repository
Jul 30,201 4 7:22:37 oracle. sysman. emcp. EMReposConfig invoke
INFO: Refer to the log file at/u01/app/oracle/10.2.0/db_1/export toollogs/emca/orcl_asm/emca_repos_create _ <date>. log for more details.
Jul 30,201 4 7:22:37 oracle. sysman. emcp. EMConfig perform
SEVERE: Error creating the repository
Refer to the log file at/u01/app/oracle/10.2.0/db_1/export toollogs/emca/orcl_asm/emca_2014-07-30_07-22-28-PM.log for more details.
Cocould not complete the configuration. Refer to the log file at/u01/app/oracle/10.2.0/db_1/export toollogs/emca/orcl_asm/emca_2014-07-30_07-22-28-PM.log for more details.
CONFIG: ORA-20001: SYSMAN already exists ..
ORA-06512: at line 17
Observe the generated log and find that the sysman user already exists. This is due to the use of the old em database to configure the database.
Oracle. sysman. assistants. util. sqlEngine. SQLFatalErrorException: ORA-20001: SYSMAN already exists ..
ORA-06512: at line 17
At oracle.sysman.assistants.util.sqlEngine.SQLEngine.exe cuteImpl (SQLEngine. java: 1467)
At oracle.sysman.assistants.util.sqlEngine.SQLEngine.exe cuteScript (SQLEngine. java: 841)
At oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.exe cuteScript (SQLPlusEngine. java: 265)
An error is still reported when the task is executed again...
Configuration: ORA-01921: role name 'mgmt _ user' conflicts with another USER or role name
Oracle. sysman. assistants. util. sqlEngine. SQLFatalErrorException: ORA-01921: role name 'mgmt _ user' conflicts with another USER or role name
At oracle.sysman.assistants.util.sqlEngine.SQLEngine.exe cuteImpl (SQLEngine. java: 1467)
At oracle.sysman.assistants.util.sqlEngine.SQLEngine.exe cuteScript (SQLEngine. java: 841)
At oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.exe cuteScript (SQLPlusEngine. java: 265)
Log on to the database and delete em-related user information.
Select grantee, granted_role from dba_role_privs where granted_role = 'mgmt _ user ';
Drop role mgmt_user;
Drop user sysman cascade;
Drop user mgmt_view cascade;
Set heading off;
Spool a. SQL
SELECT 'drop PUBLIC synonym' | SYNONYM_NAME | ';'
FROM ALL_SYNONYMS
Where owner = 'public' AND TABLE_OWNER = 'sysmance ';
Spool off
Set heading on;
@ A. SQL
Create a database again.
Jul 30,201 4 7:32:06 oracle. sysman. emcp. EMConfig perform
INFO: This operation is being logged at/u01/app/oracle/10.2.0/db_1/export toollogs/emca/orcl_asm/emca_2014-07-30_07-31-53-PM.log.
Jul 30,201 4 7:32:06 PM oracle. sysman. emcp. EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while )...
Jul 30,201 4 7:39:28 oracle. sysman. emcp. EMReposConfig invoke
INFO: Repository successfully created
Enterprise Manager configuration completed successfully