OEM Grid Control

download OEM Grid Control

of 66

Transcript of OEM Grid Control

  • 7/29/2019 OEM Grid Control

    1/66

    Upgrading Grid Control 10.2.0.5 to OEM 12c Cloud Control

    This note describes how to do what is called a 2-System Upgrade Approach to upgrade an existing 10.2.0.5 Grid

    Control environment to OEM 12c.

    We will then see how to upgrade one of the existing 10g Management Agents to 12c.

    Note that the OMS (Oracle Management Service) 12c communicates only with Oracle Management Agent 12c.

    This approach enables you to install Enterprise Manager Cloud Control on a host that is different from the hostwhere your existing Enterprise Manager system is running. So we largely leave our existing 10g OEM environmentintact.

    We basically take a backup of the existing 10g OEM repository database and restore the same on another host. Wethen use this restored database to perform the 12c upgrade.

    We then upgrade the existing 10g agents to 12c.

    So in this method, we have two environments existing side by side and we migrate and upgrade agents on apiecemeal basis.

    Advantage of this method is that there is minimal or zero downtime involved.

  • 7/29/2019 OEM Grid Control

    2/66

    Pre-Upgrade Tasks

    Apply the preupgrade console patch on your existing Enterprise Manager system to get access to theEnterprise Manager 12c Upgrade Console.

    The Preupgrade Console is the starting point for upgrading your Enterprise Manager 10g Grid Control Release 5(10.2.0.5.0) or Enterprise Manager 11g Grid Control Release 1 (11.1.0.1.0) to Enterprise Manager Cloud Control.

    To access the Enterprise Manager 12c Upgrade Console page in the 10g OEM Grid Control, apply the preupgradeconsole patch on your existing Enterprise Manager system

    Note : Stop 10g OMS to apply patch

    Apply patch 10044087

    [oracle@kens-db-049 10044087]$opatch applyInvoking OPatch 10.2.0.4.9

    Oracle Interim Patch Installer version 10.2.0.4.9Copyright (c) 2009, Oracle Corporation. All rights reserved.

    Oracle Home : /u01/app/oracle/product/oms10gCentral Inventory : /home/oracle/oraInventory

    from : /etc/oraInst.locOPatch version : 10.2.0.4.9OUI version : 10.2.0.5.0

    OUI location : /u01/app/oracle/product/oms10g/ouiLog file location : /u01/app/oracle/product/oms10g/cfgtoollogs/opatch/opatch2011-12-28_11-44-57AM.log

    Patch history file: /u01/app/oracle/product/oms10g/cfgtoollogs/opatch/opatch_history.txt

    ApplySession applying interim patch '10044087' to OH '/u01/app/oracle/product/oms10g'

  • 7/29/2019 OEM Grid Control

    3/66

    Running prerequisite checks...

    OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.

    Backing up files and inventory (not for auto-rollback) for the Oracle HomeBacking up files affected by the patch '10044087' for restore. This might take a while...Backing up files affected by the patch '10044087' for rollback. This might take a while...

    Patching component oracle.sysman.console.oms, 10.2.0.5.0...Updating jar file "/u01/app/oracle/product/oms10g/sysman/jlib/emCORE.jar" with"/sysman/jlib/emCORE.jar/oracle/sysman/eml/upgrade/preupg/plugin_support/UnzipHelperContext.class"

    ..

    Verifying the update...

    Inventory check OK: Patch ID 10044087 is registered in Oracle Home inventory with proper meta-data.Files check OK: Files from Patch ID 10044087 are present in Oracle Home.Execution of 'sh /home/oracle/10044087/custom/scripts/post -apply 10044087 ':

    0 [main] DEBUG emSDK.util.help - processing config file locale : _en_US1053 [main] DEBUG emSDK.util.help - processing config file locale : _de1087 [main] DEBUG emSDK.util.help - processing config file locale : _es1120 [main] DEBUG emSDK.util.help - processing config file locale : _fr1147 [main] DEBUG emSDK.util.help - processing config file locale : _ja1168 [main] DEBUG emSDK.util.help - processing config file locale : _ko1197 [main] DEBUG emSDK.util.help - processing config file locale : _pt_BR1215 [main] DEBUG emSDK.util.help - processing config file locale : _zh_CN

    1234 [main] DEBUG emSDK.util.help - processing config file locale : _zh_TW1252 [main] DEBUG emSDK.util.help - processing config file locale : _it

    Return Code = 0

    OPatch succeeded.

  • 7/29/2019 OEM Grid Control

    4/66

    Connect to SQLPLUS as the SYS user , and run the following sql scripts:

    SQL>@/u01/app/oracle/product/oms10g/sysman/preupgc/puc_dblink_pkgdef.sql

    SQL>@/u01/app/oracle/product/oms10g/sysman/preupgc/puc_dblink_pkgbody.sql

    Connect to SQLPLUS as the Management Repository owner SYSMAN, and run the pre_upg_console.sql script:

    SQL>@/u01/app/oracle/product/oms10g/sysman/preupgc/pre_upg_console.sql

    Now Start the 10g OMS

    Under the Deployments tab in 10g OEM Grid Control, we can now see the Upgrade Console page

  • 7/29/2019 OEM Grid Control

    5/66

  • 7/29/2019 OEM Grid Control

    6/66

    Provide information about the host for the 12c OMS

    From the Deployments page in the 10g OEM Grid Control click Enterprise Manager 12c Upgrade Console

    Select 2-System.

    Click Identify Host and Port for New Enterprise Manager System

    Provide information about the 12c Grid Control software and plug-ins which we havedownloaded from OTN

  • 7/29/2019 OEM Grid Control

    7/66

    http://www.oracle.com/technetwork/oem/grid-control/downloads/oem-upgrade-console-502238.html

    Download the Management Agent software from the Enterprise Manager download page on Oracle TechnologyNetwork (OTN) to a directory accessible by the OMS.

    Download all the required plug-ins from the Enterprise Manager download page on OTN to the same directory

    Note: Do NOT extract the contents of the software ZIP file.

    Also download all the plug-ins listed as required plug-ins on the Manage page, whether or not you want to monitora target with them.

    From the Deployments page in the 10g OEM Grid Control click Enterprise Manager 12c Upgrade Console

    Select 2-System.

    Click Manage Software.

    In the Provide Software Location section, enter the path to the directory where the core 12c ManagementAgent software and the plug-in software are present for the required platforms.

    Then click Validate to register that location with the Enterprise Manager system. Note the validation takes a bitof time.

    http://www.oracle.com/technetwork/oem/grid-control/downloads/oem-upgrade-console-502238.htmlhttp://www.oracle.com/technetwork/oem/grid-control/downloads/oem-upgrade-console-502238.html
  • 7/29/2019 OEM Grid Control

    8/66

    Restore a backup of the existing 10g OEM Repository database on the server which willhost the 12c Repository database

  • 7/29/2019 OEM Grid Control

    9/66

    Wenow use RMAN ( or any other method of choice) to restore a backup of the existing 10g OEM repositorydatabase on the server which is going to host the 12c OEM repository database and recover the database until apoint in time.

    Make a note of the log sequence number or time until which the database has been recovered.

    Install the 12c Grid Control Software

  • 7/29/2019 OEM Grid Control

    10/66

  • 7/29/2019 OEM Grid Control

    11/66

  • 7/29/2019 OEM Grid Control

    12/66

  • 7/29/2019 OEM Grid Control

    13/66

  • 7/29/2019 OEM Grid Control

    14/66

  • 7/29/2019 OEM Grid Control

    15/66

  • 7/29/2019 OEM Grid Control

    16/66

  • 7/29/2019 OEM Grid Control

    17/66

    SQL> SQL> exec dbms_scheduler.disable('SYS.GATHER_STATS_JOB');

    PL/SQL procedure successfully completed.

  • 7/29/2019 OEM Grid Control

    18/66

    SQL> commit;

    Commit complete.

    SQL> show parameter job

    NAME TYPE VALUE------------------------------------ ----------- ------------------------------

    job_queue_processes integer 10

    SQL> alter system set job_queue_processes=0;

    System altered.

  • 7/29/2019 OEM Grid Control

    19/66

  • 7/29/2019 OEM Grid Control

    20/66

    SQL> show parameter nls

    NAME TYPE VALUE------------------------------------ ----------- ------------------------------nls_calendar string

    nls_comp stringnls_currency stringnls_date_format stringnls_date_language stringnls_dual_currency stringnls_iso_currency stringnls_language string AMERICANnls_length_semantics string bytenls_nchar_conv_excp string FALSEnls_numeric_characters string

    NAME TYPE VALUE

    ------------------------------------ ----------- ------------------------------nls_sort stringnls_territory string AMERICAnls_time_format stringnls_time_tz_format stringnls_timestamp_format stringnls_timestamp_tz_format string

    SQL> grant execute on dbms_random to dbsnmp;

    Grant succeeded.

    SQL> grant execute on dbms_random to sysman;

    Grant succeeded.

    SQL> alter user oracle_ocm account unlock;

  • 7/29/2019 OEM Grid Control

    21/66

    User altered.

    SQL> alter system set processes=300 scope=spfile;

    System altered.

    SQL> show parameter sga

    NAME TYPE VALUE------------------------------------ ----------- ------------------------------lock_sga boolean FALSEpre_page_sga boolean FALSEsga_max_size big integer 1Gsga_target big integer 1G

    SQL> alter system set sga_max_size=2G scope=spfile;

    System altered.

    SQL> alter system set sga_target=2G scope=spfile;

    System altered.

    SQL> show parameter stream

    NAME TYPE VALUE------------------------------------ ----------- ------------------------------streams_pool_size big integer 48M

    SQL> alter system set streams_pool_size=300m;

    System altered.

    SQL> show parameter compat

  • 7/29/2019 OEM Grid Control

    22/66

    NAME TYPE VALUE------------------------------------ ----------- ------------------------------compatible string 10.1.0.3.0plsql_v2_compatibility boolean FALSE

    SQL> alter system set compatible='10.2.0.4' scope=spfile;

    System altered.

    SQL> shutdown immediate;

    Database closed.Database dismounted.ORACLE instance shut down.SQL> startup;

    ORACLE instance started.

    Total System Global Area 2147483648 bytesFixed Size 2097696 bytesVariable Size 738201056 bytesDatabase Buffers 1392508928 bytesRedo Buffers 14675968 bytesDatabase mounted.Database opened.SQL>

  • 7/29/2019 OEM Grid Control

    23/66

  • 7/29/2019 OEM Grid Control

    24/66

  • 7/29/2019 OEM Grid Control

    25/66

  • 7/29/2019 OEM Grid Control

    26/66

  • 7/29/2019 OEM Grid Control

    27/66

  • 7/29/2019 OEM Grid Control

    28/66

  • 7/29/2019 OEM Grid Control

    29/66

  • 7/29/2019 OEM Grid Control

    30/66

  • 7/29/2019 OEM Grid Control

    31/66

  • 7/29/2019 OEM Grid Control

    32/66

  • 7/29/2019 OEM Grid Control

    33/66

  • 7/29/2019 OEM Grid Control

    34/66

  • 7/29/2019 OEM Grid Control

    35/66

  • 7/29/2019 OEM Grid Control

    36/66

  • 7/29/2019 OEM Grid Control

    37/66

  • 7/29/2019 OEM Grid Control

    38/66

    [root@kens-orasql-002-uat ~]# /hds002/oracle/product/Middleware/oms/allroot.sh

    Starting to execute allroot.sh .........

  • 7/29/2019 OEM Grid Control

    39/66

    Starting to execute /hds002/oracle/product/Middleware/oms/root.sh ......Running Oracle 11g root.sh script...

    The following environment variables are set as:ORACLE_OWNER= oracleORACLE_HOME= /hds002/oracle/product/Middleware/oms

    Enter the full pathname of the local bin directory: [/usr/local/bin]:The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)[n]:The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)[n]:The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)[n]:

    Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root.sh script.

    Now product-specific root actions will be performed./etc exist

    Creating /etc/oragchomelist file.../hds002/oracle/product/Middleware/omsFinished execution of /hds002/oracle/product/Middleware/oms/root.sh ......

    Starting to execute /hds002/oracle/product/Middleware/agent/core/12.1.0.1.0/root.sh ......Finished product-specific root actions./etc existFinished execution of /hds002/oracle/product/Middleware/agent/core/12.1.0.1.0/root.sh ......

  • 7/29/2019 OEM Grid Control

    40/66

  • 7/29/2019 OEM Grid Control

    41/66

    On the Deployments tab in 10g Grid Control click Enterprise Manager 12c Upgrade Console.

    click Deploy and Configure AgentsUnder Operation Name, enter a unique name for the agent deployment operation.

    In the Select Operation Type section, select Deploy Agent and Plug-In Software and Configure Agent and Plug-In

    Software

    We are only upgrading one of the 10g agents to 12c. Select the agent to upgrade

    Select the base directory for the 12c agent installation and the 12c agent instance name

  • 7/29/2019 OEM Grid Control

    42/66

  • 7/29/2019 OEM Grid Control

    43/66

  • 7/29/2019 OEM Grid Control

    44/66

  • 7/29/2019 OEM Grid Control

    45/66

  • 7/29/2019 OEM Grid Control

    46/66

  • 7/29/2019 OEM Grid Control

    47/66

  • 7/29/2019 OEM Grid Control

    48/66

  • 7/29/2019 OEM Grid Control

    49/66

    Before we switch over from the existing 10g Management Agent to the newly deployed and configured Oracle ManagementAgent 12c, we can generate a report to check the health and the readiness of the deployed Management Agents.

  • 7/29/2019 OEM Grid Control

    50/66

  • 7/29/2019 OEM Grid Control

    51/66

  • 7/29/2019 OEM Grid Control

    52/66

    Before switching over from the old, existing 10g Management Agent to the newly deployed and configured OracleManagement Agent 12c, verify and sign off the health report of deployed Management Agents.

    We need to ensure that the 12c Management Agents are in a position to contact the upgraded 12c Oracle ManagementService (OMS) and monitor all the targets they monitored before the upgrade.

  • 7/29/2019 OEM Grid Control

    53/66

    We need to run the root.sh for the newly deployed 12c agent

    cd /u01/app/oracle/product/agent12g/

    [oracle@kens-db-049 product]$ cd agent12g/[oracle@kens-db-049 agent12g]$ ls

  • 7/29/2019 OEM Grid Control

    54/66

    agentimage.properties agent_inst core plugins plugins.txt plugins.txt.status sbin tmp_2011_12_30_10_44_37_93

    [oracle@kens-db-049 agent12g]$ cd ./core/12.1.0.1.0/

    [oracle@kens-db-049 12.1.0.1.0]$ suPassword:

    [root@kens-db-049 12.1.0.1.0]# ./root.shFinished product-specific root actions./etc exist

    Creating /etc/oragchomelist file.../u01/app/oracle/product/agent12g/core/12.1.0.1.0Finished product-specific root actions.[root@kens-db-049 12.1.0.1.0]#

    Switching Over to Oracle Management Agent 12c

  • 7/29/2019 OEM Grid Control

    55/66

  • 7/29/2019 OEM Grid Control

    56/66

  • 7/29/2019 OEM Grid Control

    57/66

    [oracle@kens-orasql-002-uat oracle]$ cd /hds002/oracle/product/Middleware/

    [oracle@kens-orasql-002-uat Middleware]$ cd gc_inst

    [oracle@kens-orasql-002-uat gc_inst]$ cat ./em/EMGC_OMS1/emgc.properties |grep EM_REPOS_CONNECTDESCRIPTOR

    EM_REPOS_CONNECTDESCRIPTOR=(DESCRIPTION\=(ADDRESS_LIST\=(ADDRESS\=(PROTOCOL\=TCP)(HOST\=kens-orasql-002-uat)(PORT\=1521)))(CONNECT_DATA\=(SID\=oramgnt)))

    [oracle@kens-orasql-002-uat gc_inst]$

  • 7/29/2019 OEM Grid Control

    58/66

    SQL> select owner from dba_db_links where2 db_link='PREUPGTO_NG_LINK.CALM.WA.GOV.AU';

    OWNER------------------------------PUBLIC

    SQL> select * from dual@PREUPGTO_NG_LINK.CALM.WA.GOV.AU;

    D-X

  • 7/29/2019 OEM Grid Control

    59/66

  • 7/29/2019 OEM Grid Control

    60/66

  • 7/29/2019 OEM Grid Control

    61/66

  • 7/29/2019 OEM Grid Control

    62/66

    Remove the upgraded agent from 10g Grid Control

    [oracle@kens-db-049 bin]$ pwd/u01/app/oracle/product/agent12g/core/12.1.0.1.0/bin

    [oracle@kens-db-049 bin]$ ./emctl status agentOracle Enterprise Manager 12c Cloud Control 12.1.0.1.0Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.---------------------------------------------------------------Agent Version : 12.1.0.1.0

    OMS Version : 12.1.0.1.0Protocol Version : 12.1.0.1.0Agent Home : /u01/app/oracle/product/agent12g/agent_instAgent Binaries : /u01/app/oracle/product/agent12g/core/12.1.0.1.0Agent Process ID : 10557Parent Process ID : 10456

  • 7/29/2019 OEM Grid Control

    63/66

    Agent URL : https://kens-db-049.corporateict.domain:3872/emd/main/Repository URL : https://kens-orasql-002-uat.corporateict.domain:1159/empbs/upload/Started at : 2011-12-30 11:38:55Started by user : oracleLast Reload : (none)Last successful upload : 2011-12-30 11:58:51Last attempted upload : 2011-12-30 11:58:51Total Megabytes of XML files uploaded so far : 1.71Number of XML files pending upload : 0Size of XML files pending upload(MB) : 0Available disk space on upload filesystem : 44.49%Collection Status : Collections enabledLast attempted heartbeat to OMS : 2011-12-30 11:59:06Last successful heartbeat to OMS : 2011-12-30 11:59:06

    ---------------------------------------------------------------Agent is Running and Ready

  • 7/29/2019 OEM Grid Control

    64/66

  • 7/29/2019 OEM Grid Control

    65/66

  • 7/29/2019 OEM Grid Control

    66/66