STARTED EMCA at Jan 7, 2013 3:21:02 PM EM Configuration Assistant, Version 10.2.0.1.0 Production Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information: Database SID: test Enter your database SID Listener port number: 1521 Enter Listener Port Number Password for SYS user: oracle Enter Sys password Password for SYSMAN user: oracle Enter sysman password
Do you wish to continue? [yes(Y)/no(N)]: yes Jan 7, 2013 3:21:31 PM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/test/emca_2013-01-07_03-21-02- PM.log. Jan 7, 2013 3:21:32 PM oracle.sysman.emcp.util.DBControlUtil stopOMS INFO: Stopping Database Control (this may take a while) ... Jan 7, 2013 3:21:42 PM oracle.sysman.emcp.EMReposConfig dropRepository INFO: Dropping the EM repository (this may take a while) ... Jan 7, 2013 3:23:07 PM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully dropped Enterprise Manager configuration completed successfully
Step # 2 : Then Create Repositiry
emca -config dbcontrol db -repos create
STARTED EMCA at Jan 7, 2013 3:28:56 PM EM Configuration Assistant, Version 10.2.0.1.0 Production Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information: Database SID: test Enter your database SID Listener port number: 1521 Enter Listener Port Number Password for SYS user: oracle Enter Sys password Password for DBSNMP user: oracle Enter DBSNMP password Password for SYSMAN user: oracle Enter sysman password Email address for notifications (optional): Enter Outgoing Mail (SMTP) server for notifications (optional): Enter -----------------------------------------------------------------
Database hostname ................ oracle-server.dba.com 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)]: yes Jan 7, 2013 3:29:35 PM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/test/emca_2013-01-07_03-28-56- PM.log. Jan 7, 2013 3:29:36 PM oracle.sysman.emcp.EMReposConfig createRepository INFO: Creating the EM repository (this may take a while) ... ^[[3;7~Jan 7, 2013 3:33:17 PM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully created Jan 7, 2013 3:33:26 PM oracle.sysman.emcp.util.DBControlUtil startOMS INFO: Starting Database Control (this may take a while) ... Jan 7, 2013 3:35:01 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: Database Control started successfully Jan 7, 2013 3:35:02 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: >>>>>>>>>>> The Database Control URL is http://oracle-server.dba.com:1158/em <<<<<<<<<<< Enterprise Manager configuration completed successfully FINISHED EMCA at Jan 7, 2013 3:35:02 PM
Or Use single command to drop and create repository enter information same as above
emca -config dbcontrol db -repos recreate
Another method to Drop and Create EM if we receive error the previous one Recreate SYSMAN schema
sqlplus / as sysdba
drop user sysman cascade; User dropped.
drop role MGMT_USER; Role dropped.
drop user MGMT_VIEW cascade; User dropped.
drop public synonym MGMT_TARGET_BLACKOUTS; Synonym dropped.
drop public synonym SETEMVIEWUSERCONTEXT; Synonym dropped.
SQL> exit
$ORACLE_HOME / sysman / admin / emdrep ls bin/RepManager host_name port SID -action drop bin/RepManager oracle-server.dba.com 1521 test -action drop Enter SYS users password : oracle Enter repository user name : sysman Getting temporary tablespace from database Found temporary tablespace: TEMP Checking SYS Credentials rem error switch OK. rem error switch Dropping the repository.. Quiescing DB Done. Checking for Repos User Does not Exist. Repos User does not exist Continuing with cleanup Dropping Roles/Synonymns/Tablespaces Done. Unquiescing DB Done. Dropped Repository Successfully.
$ORACLE_HOME/bin ./emca -repos create STARTED EMCA at Jan 7, 2013 4:22:16 PM EM Configuration Assistant, Version 10.2.0.1.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: oracle Password for SYSMAN user: oracle
Do you wish to continue? [yes(Y)/no(N)]: yes Jan 7, 2013 4:22:34 PM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/test/emca_2013-01-07_04-22-16- PM.log. Jan 7, 2013 4:22:35 PM oracle.sysman.emcp.EMReposConfig createRepository INFO: Creating the EM repository (this may take a while) ... Jan 7, 2013 4:25:14 PM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully created Enterprise Manager configuration completed successfully FINISHED EMCA at Jan 7, 2013 4:25:14 PM
For only Config and Deconfig EM use the following 2 commands
emca -deconfig dbcontrol db STARTED EMCA at Jan 7, 2013 4:39:53 PM EM Configuration Assistant, Version 10.2.0.1.0 Production Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information: Database SID: test
Do you wish to continue? [yes(Y)/no(N)]: yes Jan 7, 2013 4:39:59 PM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/test/emca_2013-01-07_04-39-53- PM.log. Jan 7, 2013 4:39:59 PM oracle.sysman.emcp.util.DBControlUtil stopOMS INFO: Stopping Database Control (this may take a while) ... Enterprise Manager configuration completed successfully FINISHED EMCA at Jan 7, 2013 4:40:12 PM emca -config dbcontrol db [oracle@oracle-server bin]$ emca -config dbcontrol db
STARTED EMCA at Jan 7, 2013 4:42:07 PM EM Configuration Assistant, Version 10.2.0.1.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: oracle Password for DBSNMP user: oracle Password for SYSMAN user: oracle Password for SYSMAN user: Email address for notifications (optional): Enter Outgoing Mail (SMTP) server for notifications (optional): Enter -----------------------------------------------------------------
Database hostname ................ oracle-server.dba.com 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)]: yes Jan 7, 2013 4:42:29 PM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/test/emca_2013-01-07_04-42-07- PM.log. Jan 7, 2013 4:42:29 PM oracle.sysman.emcp.DatabaseChecks performReposChecks WARNING: 'shared_pool_size' must be greater than or equal to 80 MB. Jan 7, 2013 4:42:36 PM oracle.sysman.emcp.util.DBControlUtil startOMS INFO: Starting Database Control (this may take a while) ... Jan 7, 2013 4:44:11 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: Database Control started successfully Jan 7, 2013 4:44:11 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: >>>>>>>>>>> The Database Control URL is http://oracle-server.dba.com:1158/em <<<<<<<<<<< Enterprise Manager configuration completed successfully