*********************************************************************************
* Description: Oracle Enterprise Manager[OEM] family, and dbconsole installation
* Date: 05:44 PM EST, 04/17/2018
*********************************************************************************

		 
<1> Oracle Enterprise Manager:
     |
     |__ o. OEM is a general Oracle environment management platform, and includes several products:
             |
             |__ o. OEM DBConsole .............. Web GUI to manage database locally.	
             |                               
             |__ o. OEM Grid Control ........... Web GUI to manage whole Oracle db environment, especially for RAC environment.
             |                               
             |__ o. OEM Cloud Control .......... Web GUI to manage Oracle cloud environment.
             |                               
             |__ o. OEM Fushion Middleware ..... Web GUI to manage Fushion Middleware.
             |                               
             |__ o. OEM Application ............ Web GUI to manage WebLogic.
             |                               
             |__ o. OEM ODA .................... Web GUI to manage Oracle engineering system, such as ODA and ExData.
			 
	 
	 
	 
	 
<2> OEM DbcCnsole installation:
     |
     |__ o. Passwords of user SYS/SYSMAN/DBSNMP are required in advanced. 
     |
     |__ $ set oracle_sid = <database_name>
     |   $ set oracle_unqname = <db_unique_name>
     |   $ set oracle_home = <oracle_home>	 
     |
     |
     |__ $ emca -config dbcontrol db -repos create 

	 
	 
                         STARTED EMCA at Apr 9, 2018 4:00:30 PM
                         EM Configuration Assistant, Version 11.2.0.3.0 Production
                         Copyright (c) 2003, 2011, Oracle.  All rights reserved.
                         
                         Enter the following information:
                         Database SID: wcp_1
                         Listener port number: 1521
                         Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0.4/dbhome_1 ]:
                         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 [ /u01/app/oracle/product/11.2.0.4/dbhome_1 ]:
                         ASM SID [ +ASM ]: +ASM1
                         ASM port [ 1521 ]:
                         ASM username [ ASMSNMP ]:
                         ASM user password:
                         -----------------------------------------------------------------
                         
                         You have specified the following settings
                         
                         Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0.4/dbhome_1
                         
                         Local hostname ................ testdb.emeralit.com
                         Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0.4/dbhome_1
                         Listener port number ................ 1521
                         Database SID ................ wcp_1
                         Email address for notifications ...............
                         Outgoing Mail (SMTP) server for notifications ...............
                         ASM ORACLE_HOME ................ /u01/app/oracle/product/11.2.0.4/dbhome_1
                         ASM SID ................ +ASM1
                         ASM port ................ 1521
                         ASM user role ................ SYSDBA
                         ASM username ................ ASMSNMP
                         
                         -----------------------------------------------------------------
                         Do you wish to continue? [yes(Y)/no(N)]:
                         
                         
                         CONFIG: No value was set for the parameter EMAIL_ADDRESS.
                         Apr 9, 2018 4:02:21 PM oracle.sysman.emcp.ParamsManager getParam
                         CONFIG: No value was set for the parameter MAIL_SERVER_NAME.
                         Apr 9, 2018 4:02:21 PM oracle.sysman.emcp.ParamsManager getParam
                         CONFIG: No value was set for the parameter ORACLE_HOSTNAME.
                         Apr 9, 2018 4:02:21 PM oracle.sysman.emcp.ParamsManager getHost
                         CONFIG: Host having instnces running for database TESTDB : testdb.emeralit.com
                         Apr 9, 2018 4:02:21 PM oracle.sysman.emcp.ParamsManager setParam
                         CONFIG: Setting param: REP_DB_RUNNING_HOST value: testdb.emeralit.com
                         Apr 9, 2018 4:02:21 PM oracle.sysman.emcp.ParamsManager getRepDbPort
                         CONFIG: Listener Port: 1521
                         Apr 9, 2018 4:02:21 PM oracle.sysman.emcp.util.GeneralUtil isLocalConnectionRequired
                         CONFIG: isLocalConnectionRequired: true
                         Apr 9, 2018 4:02:21 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngine
                         CONFIG: isLocalConnectionRequired: true. Connecting to database instance locally.
                         Apr 9, 2018 4:02:21 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
                         CONFIG: SQLEngine connecting with SID: wcp_1, oracleHome: /u01/app/oracle/product/11.2.0.4/dbhome_1, and user: SYS
                         Apr 9, 2018 4:02:21 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
                         CONFIG: SQLEngine created successfully and connected
                         Apr 9, 2018 4:02:21 PM oracle.sysman.emcp.DatabaseChecks performReposChecks
                         SEVERE: Dbcontrol Repository already exists.  Fix the error(s) and run EM Configuration Assistant again in standalone mode.	 
	 
	 
	 
	 
	 
	 
<3> If repository already exists, the "recreate" option is needed:
     |
     |__ $ emca -config dbcontrol db -repos recreate
                         
						 
                         STARTED EMCA at Apr 9, 2018 6:30:57 PM
                         EM Configuration Assistant, Version 11.2.0.3.0 Production
                         Copyright (c) 2003, 2011, Oracle.  All rights reserved.
                         
                         Enter the following information:
                         Database SID: wcp_1
                         Listener port number: 1521
                         Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0.4/dbhome_1 ]:
                         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 [ /u01/app/oracle/product/11.2.0.4/dbhome_1 ]:
                         ASM SID [ +ASM ]: +ASM1
                         ASM port [ 1521 ]:
                         ASM username [ ASMSNMP ]:
                         ASM user password:
                         -----------------------------------------------------------------
                         
                         You have specified the following settings
                         
                         Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0.4/dbhome_1
                         
                         Local hostname ................ testdb.emeralit.com
                         Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0.4/dbhome_1
                         Listener port number ................ 1521
                         Database SID ................ wcp_1
                         Email address for notifications ...............
                         Outgoing Mail (SMTP) server for notifications ...............
                         ASM ORACLE_HOME ................ /u01/app/oracle/product/11.2.0.4/dbhome_1
                         ASM SID ................ +ASM1
                         ASM port ................ 1521
                         ASM user role ................ SYSDBA
                         ASM username ................ ASMSNMP
                         
                         -----------------------------------------------------------------
                         ----------------------------------------------------------------------
                         WARNING : While repository is dropped the database will be put in quiesce mode.
                         ----------------------------------------------------------------------
                         Do you wish to continue? [yes(Y)/no(N)]: y
                         Apr 9, 2018 6:32:05 PM oracle.sysman.emcp.EMConfig perform
                         INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/TESTDB/emca_2018_04_09_18_30_56.log.
                         Apr 9, 2018 6:32:06 PM oracle.sysman.emcp.EMReposConfig invoke
                         INFO: Dropping the EM repository (this may take a while) ...
                         Apr 9, 2018 6:33:24 PM oracle.sysman.emcp.EMReposConfig invoke
                         INFO: Repository successfully dropped
                         Apr 9, 2018 6:33:24 PM oracle.sysman.emcp.EMReposConfig createRepository
                         INFO: Creating the EM repository (this may take a while) ...
                         Apr 9, 2018 6:37:19 PM oracle.sysman.emcp.EMReposConfig invoke
                         INFO: Repository successfully created
                         Apr 9, 2018 6:37:21 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
                         INFO: Uploading configuration data to EM repository (this may take a while) ...
                         Apr 9, 2018 6:38:12 PM oracle.sysman.emcp.EMReposConfig invoke
                         INFO: Uploaded configuration data successfully
                         Apr 9, 2018 6:38:12 PM oracle.sysman.emcp.ParamsManager getLocalListener
                         WARNING: Error retrieving listener for testdb.emeralit.com
                         Apr 9, 2018 6:38:13 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
                         INFO: Securing Database Control (this may take a while) ...
                         Apr 9, 2018 6:38:18 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
                         INFO: Database Control secured successfully.
                         Apr 9, 2018 6:38:18 PM oracle.sysman.emcp.util.DBControlUtil startOMS
                         INFO: Starting Database Control (this may take a while) ...
                         Apr 9, 2018 6:38:33 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
                         INFO: Database Control started successfully
                         Apr 9, 2018 6:38:34 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
                         INFO: >>>>>>>>>>> The Database Control URL is https://testdb.emeralit.com:5500/em <<<<<<<<<<<
                         Apr 9, 2018 6:38:35 PM oracle.sysman.emcp.EMDBPostConfig invoke
                         ************************  WARNING  ************************                       
                         Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  
                         The encryption key has been placed in the file: /u01/app/oracle/product/11.2.0.4/dbhome_1/odase0_TESTDB/sysman/config/emkey.ora. 
                         Ensure this file is backed up as the encrypted data will become unusable if this file is lost.
                         ***********************************************************
                         Enterprise Manager configuration completed successfully
                         FINISHED EMCA at Apr 9, 2018 6:38:35 PM
                         
						 
						
						
						 
						 
						 
<4> Checking Dbcontrol process status, and dashboard URL:
     |
     |__ $ emctl status dbconsole
	 
                         Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
                         Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
                         https://testdb.emeralit.com:5500/em/console/aboutApplication
                         Oracle Enterprise Manager 11g is running.
                         ------------------------------------------------------------------
                         Logs are generated in directory /u01/app/oracle/product/11.2.0.4/dbhome_1/odase0_TESTDB/sysman/log
                        
					
	 
	 
	 
	 
	 
<5> Verify agent status:
     |
     |__ $ emctl status agent
	 
                         Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0
                         Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
                         ---------------------------------------------------------------
                         Agent Version     : 10.2.0.4.5
                         OMS Version       : 10.2.0.4.5
                         Protocol Version  : 10.2.0.4.5
                         Agent Home        : /u01/app/oracle/product/11.2.0.4/dbhome_1/odase0_TESTDB
                         Agent binaries    : /u01/app/oracle/product/11.2.0.4/dbhome_1
                         Agent Process ID  : 1059
                         Parent Process ID : 976
                         Agent URL         : https://testdb.emeralit.com:3938/emd/main
                         Repository URL    : https://testdb.worldcue.com:5500/em/upload/
                         Started at        : 2018-04-09 18:38:19
                         Started by user   : oracle
                         Last Reload       : 2018-04-09 18:45:01
                         Last successful upload                       : 2018-04-09 19:19:03
                         Total Megabytes of XML files uploaded so far :    14.77
                         Number of XML files pending upload           :        0
                         Size of XML files pending upload(MB)         :     0.00
                         Available disk space on upload filesystem    :    52.61%
                         Data channel upload directory                : /u01/app/oracle/product/11.2.0.4/dbhome_1/odase0_TESTDB/sysman/recv
                         Last successful heartbeat to OMS             : 2018-04-09 19:19:35
                         ---------------------------------------------------------------
                         Agent is Running and Ready	 
	 
	 
	 
	 

<6> DBCnsole Folder Structure under ORACLE_HOME:
     |
     |__ o. /u01/app/oracle/product/11.2.0.4/dbhome_1/oc4j/j2ee/OC4J_DBConsole_<ServerName>_<DBUnique_Name>
     |
     |__ o. /u01/app/oracle/product/11.2.0.4/dbhome_1/<ServerName>_<DBUnique_Name>






<7> The DBConsole will occupy on port 5001:
     |
     |__ o. If the DBConsole of one database using 5001, the second database will use 5002 on same server.
     |
     |__ o. After OEM DBConsole coming up, DBA can use regular individual db user credential to login.




	 
	 
<8> Reference:
     |
     |__ o. http://www.oracle-wiki.net/premium:startdocshowtoinstalldeinstalldbconsole#toc4	 

    
	

Your Comments