====== DB Console für eine Oracle Datenbank 10g oder 11g anlegen ====== DB:10g, funktioniert aber auch so mit 11g Pro Datenbank auf einem Host muss eine eigenen DB Console angelegt werden. Silent install String (auf passende Wert in der eigenen Umgebung anpassen): set ORACLE_HOME=D:\oracle\1020\database set ORACLE_SID=GPI D:\oracle\1020\database\bin\emca.bat -config dbcontrol db -repos create -silent -DB_UNIQUE_NAME GPI -PORT 1521 -EM_HOME D:\oracle\1020\database -LISTENER LISTENER -SERVICE_NAME GPI -SID GPI -ORACLE_HOME D:\oracle\1020\database -HOST gpidbserver.local -LISTENER_OH D:\oracle\1020\database -LOG_FILE D:\oracle\admin\GPI\scripts\emConfig.log -DBSNMP_PWD pwd4oem -SYSMAN_PWD pwd4oem Aufruf dann über http://gpidbserver.local:1158/em/ ---- ====DB Console für eine Cluster Datenbank anlegen ==== DB:10g\\ OS:win\\ Informationen zusammenstellen: * Database unique name * Listener port number * Cluster name * Password for SYS user * Password for DBSNMP user * Password for SYSMAN user * Email address for notifications (optional) * Outgoing Mail (SMTP) server for notifications (optional) * ASM ORACLE_HOME e.g. /u01/app/asm/product/10.2.0 * ASM port e.g. 1521 * ASM user role e.g. SYSDBA * ASM username e.g. SYS * ASM user password Vorbereitung: User DBSNMP account unlock und Passwort setzen Auf dem Knoten 1: # Oracle Home und SID der DB setzen D:\oracle\1020\database\bin\emca.bat -config dbcontrol db -repos create -cluster STARTED EMCA at Oct 14, 2010 5:32:13 PM EM Configuration Assistant, Version 10.2.0.1.0 Production Copyright (c) 2003, 2005, Oracle. All rights reserved. Enter the following information: Database unique name: GPIDB Listener port number: 1521 Cluster name: crs Password for SYS user: Password for DBSNMP user: Password for SYSMAN user: Email address for notifications (optional): xxxxx Outgoing Mail (SMTP) server for notifications (optional): xxxxxx ASM ORACLE_HOME [ D:\oracle\1020\database ]: D:\oracle\1020\ASM ASM port [ 1521 ]: ASM user role [ SYSDBA ]: ASM username [ SYS ]: ASM user password: ----------------------------------------------------------------- You have specified the following settings Database ORACLE_HOME ................ D:\oracle\1020\database Database instance hostname ................ gpirac0DBT02 Listener port number ................ 1521 Cluster name ................ crs Database unique name ................ GPIDB Email address for notifications ............... xxxxxxxxx Outgoing Mail (SMTP) server for notifications ............... xxxxxxx ASM ORACLE_HOME ................ D:\oracle\1020\ASM ASM port ................ 1521 ASM user role ................ SYSDBA ASM username ................ SYS ----------------------------------------------------------------- Do you wish to continue? [yes(Y)/no(N)]: Y Oct 14, 2010 5:43:33 PM oracle.sysman.emcp.EMConfig perform INFO: This GPIDBtion is being logged at D:\oracle\1020\database\cfgtoollogs\emca\GPIDB\emca_2010-10-14_05-32-13-PM.log. Oct 14, 2010 5:43:49 PM oracle.sysman.emcp.EMReposConfig createRepository INFO: Creating the EM repository (this may take a while) ... Oct 14, 2010 5:46:04 PM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully created Oct 14, 2010 5:46:14 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles INFO: Propagating D:\oracle\1020\database\oc4j\j2ee\OC4J_DBConsole_gpirac0dbt02_GPIDB2 to remote nodes ... Oct 14, 2010 5:46:14 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles INFO: Propagating D:\oracle\1020\database\oc4j\j2ee\OC4J_DBConsole_gpirac0dbt01_GPIDB1 to remote nodes ... Oct 14, 2010 5:46:14 PM oracle.sysman.emcp.EMDBCConfig copyAndPropagateOC4JDir INFO: Propagating D:\oracle\1020\database\oc4j\j2ee\isqlplus_gpirac0DBT02 to remote nodes ... Oct 14, 2010 5:46:14 PM oracle.sysman.emcp.EMDBCConfig copyAndPropagateOC4JDir INFO: Propagating D:\oracle\1020\database\oc4j\j2ee\isqlplus_gpirac0DBT01 to remote nodes ... Oct 14, 2010 5:46:16 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs INFO: Propagating D:\oracle\1020\database\gpirac0dbt02_GPIDB2 to remote nodes ... Oct 14, 2010 5:46:18 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs INFO: Propagating D:\oracle\1020\database\gpirac0dbt01_GPIDB1 to remote nodes ... Oct 14, 2010 5:46:27 PM oracle.sysman.emcp.util.DBControlUtil startOMS INFO: Starting Database Control (this may take a while) ... Oct 14, 2010 5:47:49 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: Database Control started successfully Oct 14, 2010 5:47:49 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: >>>>>>>>>>> The Database Control URL is http://gpirac0DBT02:1158/em <<<<<<<<<<< Oct 14, 2010 5:47:49 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage INFO: **************** Current Configuration **************** INSTANCE NODE DBCONTROL_UPLOAD_HOST ---------- ---------- --------------------- GPIDB2 gpirac0dbt02 gpirac0DBT02 GPIDB1 gpirac0dbt01 gpirac0DBT02 Enterprise Manager configuration completed successfully FINISHED EMCA at Oct 14, 2010 5:47:49 PM ---- === Deinstallation === Achtung! Nicht im Live System - DB wird evlt. gestoppt!!! Cluster: emca -deconfig dbcontrol db -repos drop -cluster ---- ==== Weitere Infos ==== Falls man die Portnummer vergessen hat unter "$ORACLE_HOME/install/portlist.ini" nachschauen! ---- ==== Probleme mit den Umgebungsvariablen- OC4J Configuration issue. ==== **Problem: emctl meldet einen OC4J Configuration issue** emctl status dbconsole OC4J Configuration issue. /opt/oracle/product/11.2.0.4/dbhome_1/oc4j/j2ee/OC4J_DBConsole_gpirac1_GPIDB not found. **Lösung - Oracle Datenbank Name und der Oracle Host Name müssen genau auch den Pfald unter $ORACLE_HOME/oc4j/j2ee/OC4J* entprechen!** export ORACLE_UNQNAME=TNG3IP export ORACLE_HOSTNAME=tng3db01