Friday 1 July 2011

Grid Control Repository: Steps to Migrate the 10g Repository from One Machine to Another on the Same Platform

Grid Control Repository: Steps to Migrate the 10g Repository from One Machine to Another on the Same Platform [Oracle Doc ID 1068841.1]

Modified 14-APR-2011     Type HOWTO     Status PUBLISHED
In this Document
  Goal
  Solution
     Pre-Migration EM-Specific Steps
     Repository Database Migration
     Post-Migration EM-Specific Steps
  References




Applies to:

Enterprise Manager Grid Control - Version: 10.2.0.1 to 10.2.0.5 - Release: 10.2 to 10.2
Information in this document applies to any platform.

Goal

This note describes the steps to be followed for migrating the Grid Control 10G Repository Database from one machine to another machine, both having the same Operating System and version.

The scenario outlined assumes the following:

- The source and destination Operating System (platform) and version are the same.
- Valid Operating System level backups are taken for the , and the (on the OMS machine).
- Adequate down-time is scheduled for the Grid Control setup during the migration.
- The following steps have been pre-attempted on a Test setup before being tried with a Production Grid Control setup.

  • For Cross-platform migration of the 10g Repository, refer to:
    Note 388090.1: Grid Control Repository: Steps for Cross Platform Migration of the Grid Control Repository/OMS
  • For the 11g Grid Control repository migration, refer to
    Note 1302281.1: 11g Grid Control: Steps for Migrating the 11g Grid Control Repository from One Database to Another.


Solution

Pre-Migration EM-Specific Steps

  • Stop the HTTP Server component of the OMS, to stop the Agents from uploading any further xml files during the Repository Database migration:
    cd /opmn/bin
    opmnctl stopproc process-type=HTTP_Server

    If there are multiple OMS, then the above step should be performed on all OMS machines.

    Wait for sometime and check whether there are any pending xml files in the /sysman/recv directory or the value of the ReceiveDir parameter (if this has been manually modified from the default value) in the <>/sysman/config/emoms.properties file
    Wait for all the xml files to be cleared up. A small number of xml backlog is acceptable but having large number of files may cause performance issues when the OMS is re-started after the repository database migration (pending backlog before migration + backlog created during migration).

    After this, stop the OMS:

    cd /opmn/bin
    opmnctl stopall

  • Login to the repository database and run the following SQL statements:

    SQL> sqlplus "/as sysdba"
    SQL> show parameter job_queue_processes
    SQL> alter system set job_queue_processes=0;
           Make a note of the value that was set for the job_queue_processes initialization parameter.
           Verify from the database alert.log file that the database is running fine without any major issues.
  • Login to the database as the sysman user and execute:

    SQL> exec emd_maintenance.partition_maintenance; (This will drop the old partitions);
    SQL> exec emd_maintenance.remove_em_dbms_jobs;


Repository Database Migration

  • Install the RDBMS software on destination machine. Ensure sure that the RDBMS software version and one-off patches applied are same on both the destination and source machines. Also, install a grid Agent installed on this machine if not present already.

  • Clone / Migrate the repository database to the new machine using any of database cloning methods (using RMAN, DBCA etc).

    References:
    Note 259694.1: Oracle10G RMAN Database Duplication
    Note 388431.1: Creating a Duplicate Database on a New Host.

    Note 733530.1: Grid Control Repository: How to Move Grid Control Repository from One Machine to Another Using DBCA (on the same Platform)
    Note 954615.1: Grid Control Repository: How to use RMAN to Move and Upgrade the Repository Database in a RAC Cluster Configuration?
    Note 602955.1: Grid Control Repository: Steps To Move the Repository Using an Inconsistent (Hot) Database Backup

  • If DBCA is used for the new database, then all the schema users will be locked and their password expired. So, the accounts need to be unlocked and their password reset manually.
    Execute the following for EM-specific users :

    SQL> sqlplus "/as sysdba"
    SQL> alter user SYSMAN identified by account unlock ;
    SQL> alter user DBSNMP identified by account unlock ;
    SQL> alter user MGMT_VIEW account unlock ;

    Note:
    - The password for the sysman and dbsnmp users should be same as the password in the original repository database.
    - For list of other users run "select username from dba_users;"
    - Unlock and re-set the passwords for the other users using similar 'alter user' command as the above.

Post-Migration EM-Specific Steps

  • Login to new Repository database as sysman and execute:

    SQL> exec emd_maintenance.analyze_emd_schema('SYSMAN');

  • Login to repository database as sysdba, restore the original value of job_queue_processes initialization parameter and submit the EM jobs:
    SQL> alter system set job_queue_processes=10 scope=both;
    SQL> connect sysman/
    SQL> exec emd_maintenance.submit_em_dbms_jobs;

  • On the OMS machine:
    - Take a backup of the /sysman/config/emoms.properties
    - In the emoms.properties file, look for the parameter oracle.sysman.eml.mntr.emdRepConnectDescriptor.
    - Update the details: host name / listener port / Repository SID in this parameter value with the connection details of the new repository. 
    - The above steps should be performed on all the OMS connecting to the repository database.

  • Startup OMS

    cd /opmn/bin
    opmnctl startall

  • Connect to the Grid Console from a browser. Navigate to setup -> Management Services and Repository -> Monitoring Configuration. Update the connection details for the "Management Services and repository" target to point the new Repository.

  • From a machine, where emcli is configured, relocate the repository database target from the old machine to the new database machine:

    emcli relocate_targets -src_agent=""
    -dest_agent="" -target_name="" -target_type=oracle_database -copy_from_src -force

    Reference:
    Note 577443.1: How to Setup and Configure Target Relocate using EMCLI 

References

NOTE:781314.1 - Grid Control Repository: Steps to Rename the Repository Database Name using NID Utility
NOTE:1302281.1 - 11g Grid Control: Steps for Migrating the 11g Grid Control Repository from One Database to Another
NOTE:388090.1 - Grid Control Repository: Steps for Cross Platform Migration of the Grid Control Repository

No comments:

Post a Comment