How to Recreate Oracle Enterprise Manager - Database Control Repository
How to Recreate Oracle
Enterprise Manager - Database Control Repository
Applies to:
Enterprise Linux – Version: 5
Oracle Database 11gR1
Oracle EBS R12.1
Description:
After Cloning of EBS, Oracle
Enterprise Manager is not started.
Solution:
To recreate the
Database Control Repository do the following simple steps:
Make sure that the Database
environment is properly set.
To check ORACLE_HOME and ORACLE_SID
values properly set:
[oraprod@ebsdev ~]$ echo $ORACLE_HOME
/d01/oracle/TEST/db/tech_st/11.1.0
[oraprod@ebsdev ~]$ echo $ORACLE_SID
TEST
[oraprod@ebsdev ~]$ sqlplus / as sysdba
SQL> drop user sysman
cascade;
SQL> drop role mgmt_user;
SQL> drop user mgmt_view
cascade;
SQL> drop public synonym
mgmt_target_blackouts;
SQL> drop public synonym
setemviewusercontext;
SQL> drop public
synonym mgmt_availability;
SQL> DECLARE
CURSOR c1 IS
SELECT owner, synonym_name name
FROM dba_synonyms
WHERE table_owner = 'SYSMAN';
BEGIN
FOR r1 IN c1 LOOP
IF r1.owner = 'PUBLIC' THEN
EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM '||r1.name;
ELSE
EXECUTE
CURSOR c1 IS
SELECT owner, synonym_name name
FROM dba_synonyms
WHERE table_owner = 'SYSMAN';
BEGIN
FOR r1 IN c1 LOOP
IF r1.owner = 'PUBLIC' THEN
EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM '||r1.name;
ELSE
EXECUTE
IMMEDIATE 'DROP SYNONYM '||r1.owner||'.'||r1.name;
END IF;
END LOOP;
END;
/
exit
END IF;
END LOOP;
END;
/
exit
Remove the following
directories:
[oraprod@ebsdev ~]$ rm -rf
$ORACLE_HOME/host_sid/
[oraprod@ebsdev ~]$ rm –rf
$ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_host_sid
To create the DB control and repository:
[oraprod@ebsdev ~]$ emca
-config dbcontrol db -repos create
STARTED EMCA at Nov 28, 2018
11:38:28 AM
EM Configuration Assistant,
Version 11.1.0.7.0 Production
Copyright (c) 2003, 2005,
Oracle. All rights reserved.
Enter the following
information:
Database SID: TEST
Listener port number: 1521
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
Password for SYSMAN user:
Email address for notifications (optional):
Outgoing Mail (SMTP) server
for notifications (optional):
-----------------------------------------------------------------
You have specified the
following settings
Database ORACLE_HOME
................ /d01/oracle/TEST/db/tech_st/11.1.0
Local hostname
................ ebsdev.karachi.org
Listener port number
................ 1521
Database SID
................ TEST
Email address for notifications
...............
Outgoing Mail (SMTP) server
for notifications ...............
-----------------------------------------------------------------
Do you wish to continue?
[yes(Y)/no(N)]: Y
Nov 28, 2018 11:39:53 AM
oracle.sysman.emcp.EMConfig perform
INFO: This operation is
being logged at
/d01/oracle/TEST/db/tech_st/11.1.0/cfgtoollogs/emca/TEST/emca_2018_11_28_11_38_28.log.
Nov 28, 2018 11:39:54 AM
oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM
repository (this may take a while) ...
Nov 28, 2018 11:47:34 AM
oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository
successfully created
Nov 28, 2018 11:47:39 AM
oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading
configuration data to EM repository (this may take a while) ...
Nov 28, 2018 11:48:24 AM
oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration
data successfully
Nov 28, 2018 11:48:26 AM
oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
INFO: Software library
configured successfully.
Nov 28, 2018 11:48:26 AM
oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Deploying Provisioning
archives ...
Nov 28, 2018 11:48:32 AM
oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Provisioning archives
deployed successfully.
Nov 28, 2018 11:48:33 AM
oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database
Control (this may take a while) ...
Nov 28, 2018 11:48:43 AM
oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured
successfully.
Nov 28, 2018 11:48:44 AM
oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database
Control (this may take a while) ...
Nov 28, 2018 11:49:04 AM
oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started
successfully
Nov 28, 2018 11:49:05 AM
oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO:
>>>>>>>>>>> The Database Control URL is
https://ebsdev.karachi.org:1158/em <<<<<<<<<<<
Nov 28, 2018 11:49:07 AM
oracle.sysman.emcp.EMDBPostConfig invoke
***********************************************************
Enterprise Manager
configuration completed successfully
FINISHED EMCA at Nov 28,
2018 11:49:07 AM
[oraprod@ebsdev ~]$
Oracle Enterprise Manager is
working fine now.
Your
comments, especially which will help us improve the functionality, will be
greatly appreciatedJ
Comments
Post a Comment