[oracle@dbserver1]$ emca -config dbcontrol db -repos recreate -cluster
STARTED EMCA at May 20, 2015 11:24:44 AM EM Configuration Assistant, Version 10.2.0.5.0 Production Copyright (c) 2003, 2009, Oracle. All rights reserved.
Enter the following information: Database unique name: ORCL Listener port number: 1521 Cluster name: cluster Password for SYS user: ***** Password for DBSNMP user: ***** Password for SYSMAN user: ***** Email address for notifications (optional): aa@aa.cz Outgoing Mail (SMTP) server for notifications (optional): ASM ORACLE_HOME [ /u00/app/oracle/product/10.2.0 ]: /u00/11.2.0 ASM port [ 1521 ]: ASM user role [ SYSDBA ]: ASM username [ SYS ]: ASM user password: ***** -----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /u00/app/oracle/product/10.2.0
Database instance hostname ................ dbserver1.pcks.cz Listener port number ................ 1521 Cluster name ................ cluster Database unique name ................ ORCL Email address for notifications ............... aa@aa.cz Outgoing Mail (SMTP) server for notifications ............... ASM ORACLE_HOME ................ /u00/11.2.0 ASM port ................ 1521 ASM user role ................ SYSDBA ASM username ................ SYS
-----------------------------------------------------------------
---------------------------------------------------------------------- WARNING : While repository is dropped the database will be put in quiesce mode. ---------------------------------------------------------------------- Do you wish to continue? [yes(Y)/no(N)]: Y May 20, 2015 11:28:42 AM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /u00/app/oracle/product/10.2.0/cfgtoollogs/emca/ORCL/emca_2015-05-20_11-24-44-AM.log. May 20, 2015 11:28:45 AM oracle.sysman.emcp.EMReposConfig invoke INFO: Dropping the EM repository (this may take a while) ... May 20, 2015 11:28:46 AM oracle.sysman.emcp.EMReposConfig dropRepository INFO: Dropping the EM repository (this may take a while) ... May 20, 2015 11:28:47 AM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully dropped May 20, 2015 11:28:47 AM oracle.sysman.emcp.EMReposConfig createRepository INFO: Creating the EM repository (this may take a while) ... May 20, 2015 11:31:20 AM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully created May 20, 2015 11:31:22 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles INFO: Propagating /u00/app/oracle/product/10.2.0/oc4j/j2ee/OC4J_DBConsole_dbserver1_ORCL1 to remote nodes ... May 20, 2015 11:31:23 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles INFO: Propagating /u00/app/oracle/product/10.2.0/oc4j/j2ee/OC4J_DBConsole_dbserver2_ORCL2 to remote nodes ... May 20, 2015 11:31:24 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles INFO: Propagating /u00/app/oracle/product/10.2.0/oc4j/j2ee/OC4J_DBConsole_dbserver3_ORCL3 to remote nodes ... May 20, 2015 11:31:26 AM oracle.sysman.emcp.EMDBCConfig copyAndPropagateOC4JDir INFO: Propagating /u00/app/oracle/product/10.2.0/oc4j/j2ee/isqlplus_dbserver1.comp.cz to remote nodes ... May 20, 2015 11:31:27 AM oracle.sysman.emcp.EMDBCConfig copyAndPropagateOC4JDir INFO: Propagating /u00/app/oracle/product/10.2.0/oc4j/j2ee/OC4J_SEARCH_dbserver1.comp.cz to remote nodes ... May 20, 2015 11:31:28 AM oracle.sysman.emcp.EMDBCConfig copyAndPropagateOC4JDir INFO: Propagating /u00/app/oracle/product/10.2.0/oc4j/j2ee/isqlplus_dbserver2.comp.cz to remote nodes ... May 20, 2015 11:31:29 AM oracle.sysman.emcp.EMDBCConfig copyAndPropagateOC4JDir INFO: Propagating /u00/app/oracle/product/10.2.0/oc4j/j2ee/OC4J_SEARCH_dbserver2.comp.cz to remote nodes ... May 20, 2015 11:31:30 AM oracle.sysman.emcp.EMDBCConfig copyAndPropagateOC4JDir INFO: Propagating /u00/app/oracle/product/10.2.0/oc4j/j2ee/isqlplus_dbserver3.comp.cz to remote nodes ... May 20, 2015 11:31:31 AM oracle.sysman.emcp.EMDBCConfig copyAndPropagateOC4JDir INFO: Propagating /u00/app/oracle/product/10.2.0/oc4j/j2ee/OC4J_SEARCH_dbserver3.comp.cz to remote nodes ... May 20, 2015 11:31:34 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs INFO: Propagating /u00/app/oracle/product/10.2.0/dbserver1_ORCL1 to remote nodes ... May 20, 2015 11:31:36 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs INFO: Propagating /u00/app/oracle/product/10.2.0/dbserver2_ORCL2 to remote nodes ... May 20, 2015 11:31:38 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs INFO: Propagating /u00/app/oracle/product/10.2.0/dbserver3_ORCL3 to remote nodes ... May 20, 2015 11:31:40 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole INFO: Securing Database Control (this may take a while) ... May 20, 2015 11:32:39 AM oracle.sysman.emcp.util.DBControlUtil startOMS INFO: Starting Database Control (this may take a while) ... May 20, 2015 11:43:29 AM oracle.sysman.emcp.EMConfig perform SEVERE: Error starting Database Control Refer to the log file at /u00/app/oracle/product/10.2.0/cfgtoollogs/emca/ORCL/emca_2015-05-20_11-24-44-AM.log for more details. Could not complete the configuration. Refer to the log file at /u00/app/oracle/product/10.2.0/cfgtoollogs/emca/ORCL/emca_2015-05-20_11-24-44-AM.log for more details.
U verze 10g je problém s expirací certikátu a proto OEM běží jen na HTTP.
Výpis z trace souboru
2015-05-20 11:34:11 Thread-1 ERROR util.files: ERROR: nmeufis_new: failed in lfiopn on file: /u00/app/oracle/product/10.2.0/dbserver1_ORCL1/sysman/emd/agntstmp.txt. error = 2 (No su ch file or directory) 2015-05-20 11:34:11 Thread-1 ERROR ssl: Open wallet failed, ret = 28750 2015-05-20 11:34:11 Thread-1 ERROR ssl: nmehlenv_openWallet failed 2015-05-20 11:34:11 Thread-1 ERROR http: 257: Unable to initialize ssl connection with server, aborting connection attempt 2015-05-20 11:34:11 Thread-1 ERROR pingManager: nmepm_pingReposURL: Cannot connect to https://dbserver1.comp.cz:5500/em/upload/: retStatus=-1
[oracle@dbserver1]$ emctl status dbconsole Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. https://dbserver1.comp.cz:5500/em/console/aboutApplication Oracle Enterprise Manager 10g is not running. ------------------------------------------------------------------ Logs are generated in directory /u00/app/oracle/product/10.2.0/dbserver1_ORCL1/sysman/log [oracle@dbserver1]$ emctl start dbconsole Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. https://dbserver1.comp.cz:5500/em/console/aboutApplication - An instance of Oracle Enterprise Manager 10g Database Control is already running. [oracle@dbserver1]$ emctl unsecure dbconsole Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. https://dbserver1.comp.cz:5500/em/console/aboutApplication Configuring DBConsole for HTTP... Done. DBCONSOLE already stopped... Done. Agent is already stopped... Done. Unsecuring dbconsole... Started. DBConsole is now unsecured... Done. Unsecuring dbconsole... Sucessful. [oracle@dbserver1]$ emctl upload Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. upload failed with ret=-6 [oracle@dbserver1]$ emctl start dbconsole Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. http://dbserver1.comp.cz:5500/em/console/aboutApplication - An instance of Oracle Enterprise Manager 10g Database Control is already running. [oracle@dbserver1]$ emctl stop dbconsole Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. http://dbserver1.comp.cz:5500/em/console/aboutApplication Stopping Oracle Enterprise Manager 10g Database Control ... --- Failed to shutdown DBConsole Gracefully --- failed.
Defaultní konfigurace po instalaci. DB console je pouze na prvním node.
[oracle@dbserver1]$ emca -displayConfig dbcontrol -cluster
STARTED EMCA at May 20, 2015 12:34:35 PM EM Configuration Assistant, Version 10.2.0.5.0 Production Copyright (c) 2003, 2009, Oracle. All rights reserved.
Enter the following information: Database unique name: ORCL
Do you wish to continue? [yes(Y)/no(N)]: y May 20, 2015 12:34:52 PM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /u00/app/oracle/product/10.2.0/cfgtoollogs/emca/ORCL/emca_2015-05-20_12-34-34-PM.log. May 20, 2015 12:34:56 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage INFO: **************** Current Configuration **************** INSTANCE NODE DBCONTROL_UPLOAD_HOST ---------- ---------- ---------------------
ORCL1 dbserver1 dbserver1.comp.cz ORCL2 dbserver2 dbserver1.comp.cz ORCL3 dbserver3 dbserver1.comp.cz
Pro zastavení všech procesu OEM lze použít kill utilitu, která je v patchi 8350262
[oracle@dbserver1]$ unzip p8350262_10205_Generic.zip Archive: p8350262_10205_Generic.zip [oracle@dbserver1]$ cd 8350262/ [oracle@dbserver1]$ ls README.txt etc files killDBConsole killDBConsole.pl [oracle@dbserver1]$ ls -ltr total 26 drwxr-xr-x 3 oracle oinstall 512 Sep 13 2010 files drwxr-xr-x 4 oracle oinstall 512 Sep 13 2010 etc -rw-rw-r-- 1 oracle oinstall 3275 Oct 6 2010 README.txt -rwxrwxr-x 1 oracle oinstall 4640 Oct 7 2010 killDBConsole.pl -rwxrwxr-x 1 oracle oinstall 1069 Oct 7 2010 killDBConsole [oracle@dbserver1]$ ./killDBConsole ORACLE_HOME=/u00/app/oracle/product/10.2.0 ORACLE_SID=ORCL1 State directory = /u00/app/oracle/product/10.2.0/dbserver1_ORCL1 WatchDog PID = 20 DBconsole PID = 32 EMAgent PID = 1721 Killing WatchDog (pid=20) ... Successfully killed process 20 Killing DBConsole (pid=32) ... Successfully killed process 32 Killing EMAgent (pid=1721) ... Successfully killed process 1721 [oracle@dbserver1]$
[oracle@dbserver1]$ emctl stop dbconsole Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. http://dbserver1.comp.cz:5500/em/console/aboutApplication Stopping Oracle Enterprise Manager 10g Database Control ...... Stopped. [oracle@dbserver1]$ emctl start dbconsole Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. http://dbserver1.comp.cz:5500/em/console/aboutApplication Starting Oracle Enterprise Manager 10g Database Control .................................. started. ------------------------------------------------------------------ Logs are generated in directory /u00/app/oracle/product/10.2.0/dbserver1_ORCL1/sysman/log
[oracle@dbserver1]$ emctl status dbconsole Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. http://dbserver1.comp.cz:5500/em/console/aboutApplication Oracle Enterprise Manager 10g is running. ------------------------------------------------------------------ Logs are generated in directory /u00/app/oracle/product/10.2.0/dbserver1_ORCL1/sysman/log
Konfigurace OEM i na ostatních nodech emca -reconfig dbcontrol -cluster -EM_NODE dbserver2 -EM_SID_LIST ORCL2 emca -reconfig dbcontrol -cluster -EM_NODE dbserver3 -EM_SID_LIST ORCL3
Opět se musí nastavit v unsecure módu.
[oracle@dbserver2]$ emctl unsecure dbconsole Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. https://dbserver2.comp.cz:5500/em/console/aboutApplication Configuring DBConsole for HTTP... Done. DBConsole is already unsecured. [oracle@dbserver2]$ emctl status dbconsole Oracle Enterprise Manager 10g Database Control Release 10.2.0.5.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. https://dbserver2.comp.cz:5500/em/console/aboutApplication Oracle Enterprise Manager 10g is not running.
[oracle@dbserver1]$ emca -displayConfig dbcontrol -cluster
STARTED EMCA at May 20, 2015 2:22:37 PM EM Configuration Assistant, Version 10.2.0.5.0 Production Copyright (c) 2003, 2009, Oracle. All rights reserved.
Enter the following information: Database unique name: ORCL
Do you wish to continue? [yes(Y)/no(N)]: y May 20, 2015 2:23:04 PM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /u00/app/oracle/product/10.2.0/cfgtoollogs/emca/ORCL/emca_2015-05-20_02-22-37-PM.log. May 20, 2015 2:23:09 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage INFO: **************** Current Configuration **************** INSTANCE NODE DBCONTROL_UPLOAD_HOST ---------- ---------- ---------------------
ORCL1 dbserver1 dbserver1.comp.cz ORCL2 dbserver2 dbserver2.comp.cz ORCL3 dbserver3 dbserver3.comp.cz
Enterprise Manager configuration completed successfully FINISHED EMCA at May 20, 2015 2:23:09 PM
Zajimavé notes na MOS
Enterprise Manager Database Control Configuration – Recovering From Errors Due to CA Expiry on Oracle Database 10.2.0.4 or 10.2.0.5 [Video] (Doc ID 1222603.1)
Patch 8350262: CREATE DBCONSOLE CERT WITH 10YEAR VALIDITY
Database Control emctl stop dbconsole failing with error: Failed to shutdown DBConsole Gracefully (Doc ID 335532.1)
How to manage DB Control 10.2 for RAC Database with emca (Doc ID 395162.1)