Administer > Additional Configuration > Disaster Recovery > Clean up the New Environment Before Startup

Clean up the New Environment Before Startup

Now that you have replicated the production environment, certain settings must be manually modified to avoid confusion between the production environment and the disaster recovery environment. This procedure removes all machine-specific references in the configuration of the disaster recovery environment.

Note  

  • Before starting the activation procedures, the OMi administrator should ensure that the appropriate license has been applied to the failover instance and that all the available data collectors can communicate with the failover instance.

  • HPE recommends that an experienced database administrator perform the SQL statements included in this procedure.

  • The SQL statements below are to be run against the management database except for the last step. The SQL statement in the last step needs to be run against the event database.

  1. Delete old information from HA (High Availability) tables.

    Run the following queries on the management database of the disaster recovery environment:

    • delete from HA_ACTIVE_SESS

    • delete from HA_BACKUP_PROCESSES

    • delete from HA_PROC_ALWD_SERVICES

    • delete from HA_PROCESSES

    • delete from HA_SRV_ALLWD_GRPS

    • delete from HA_SERVICES_DEP

    • delete from HA_SERVICES

    • delete from HA_SERVICE_GRPS

    • delete from HA_TASKS

    • delete from HA_SERVERS

  2. Run the following query on the management database of the disaster recovery environment:

    Delete from PROPERTIES where NAME = 'HAServiceControllerUpgrade'

  3. Switch references in the SESSIONS table on the management database of the disaster recovery environment to the backup databases.

    1. Run the following query to retrieve all database names:

      SELECT * FROM SESSIONS

      where SESSION_NAME like '%Unassigned%'

    2. Update the following columns in each received row with the following values:

      • SESSION_NAME: Replace with the new restored database name (only where SESSION_NAME is like '%Unassigned%'). Use the following script:

        UPDATE SESSIONS set SESSION_NAME='Unassigned<NEW_DB_Server_name><NEW_schema_name><DB_User_name>'

        WHERE SESSION_NAME='Unassigned<OLD_DB_Server_name><OLD_schema_name><old_DB_User_name>'

      • SESSION_DB_NAME: Replace with the new restored schema name. Use the following script:

        UPDATE SESSIONS set SESSION_DB_NAME='<<NEW_schema_name>'

        WHERE SESSION_DB_NAME='<OLD_schema_name>'

      • SESSION_DB_HOST: Replace with the new restored database host name. Use the following script:

        UPDATE SESSIONS set SESSION_DB_HOST='<<NEW_host_name>'

        WHERE SESSION_DB_HOST='<OLD_host_name>'

      • SESSION_DB_PORT: Replace with the new restored port name. Use the following script:

        UPDATE SESSIONS set SESSION_DB_PORT='<NEW_port_name>'

        WHERE SESSION_DB_PORT='<OLD_port_name>'

      • SESSION_DB_SID: Replace with the new restored session ID name. Use the following script:

        UPDATE SESSIONS set SESSION_DB_SID='<<<NEW_SID_name>>>'

        WHERE SESSION_DB_SID='<<<OLD_SID_name>>>'

      • SESSION_DB_UID: Replace with the new restored name. Use the following script:

        UPDATE SESSIONS set SESSION_DB_UID='<NEW_UID_name>'

        WHERE SESSION_DB_UID='<OLD_UID_name>'

      • SESSION_DB_SERVER: Replace with the new restored server name. Use the following script:

        UPDATE SESSIONS set SESSION_DB_SERVER='<NEW_server_name>'

        WHERE SESSION_DB_SERVER='<OLD_server_name>'

  4. Delete machines from the DEPLOY_HW (Deployment) table on the management database.

    Run the following query:

    DELETE from DEPLOY_HW

  5. Update the URLS and LDAP Server in the SETTING_PARAMETERS table on the management database.

    The following table shows the keys in the SETTING_PARAMETERS table that need to be updated if they are present:

    SP_CONTEXT

    SP_NAME

    Description

    opr opr.cs.host IP address of the new primary data processing server (used to handle certificate requests)

    platform

    settings.smtp.server

    Name of the SMTP server used for the alert engine

    scheduledreports

    settings.smtp.server

    Name of the SMTP server used for scheduled reports

    platform

    default.core.server.url

    The URL used by data collectors to access the gateway server in BSM

    platform

    default.centers.server.url

    The URL used by users to access BSM

    platform virtual.centers.server.url

     

    platform virtual.core.server.url  

    For each key in the table, modify and run the following query:

    update SETTING_PARAMETERS set SP_VALUE='<new value>'

    where SP_CONTEXT='<context value>' and SP_NAME='<name value>'

    As follows:

    • update SETTING_PARAMETERS set SP_VALUE='<IP of new primary DPS>' where SP_CONTEXT='opr' and SP_NAME='opr.cs.host'

    • update SETTING_PARAMETERS set SP_VALUE='<newmachinename>' where SP_CONTEXT='platform' and SP_NAME='settings.smtp.server'

    • update SETTING_PARAMETERS set SP_VALUE='<newmachinename>' where SP_CONTEXT='scheduledreports' and SP_NAME='settings.smtp.server'

    • update SETTING_PARAMETERS set SP_VALUE='http://<newmachinename>:80' where SP_CONTEXT='platform' and SP_NAME='default.core.server.url'

    • update SETTING_PARAMETERS set SP_VALUE='http://<newmachinename>:80' where SP_CONTEXT='platform' and SP_NAME='default.centers.server.url'

    The last two settings in the table above do not need to be updated unless you are using a load balancer or a reverse proxy. In that case, update the settings as follows:

    • update SETTING_PARAMETERS set SP_VALUE='http://<Load Balancer or Reverse Proxy>:80' where SP_CONTEXT='platform' and SP_NAME='virtual.centers.server.url'

    • update SETTING_PARAMETERS set SP_VALUE='http://<Load Balancer or Reverse Proxy>:80' where SP_CONTEXT='platform' and SP_NAME='virtual.core.server.url'

    If the load balancer IP changes between the sites and the load balancer is configured to do TLS offloading, you may need to set the following:

    update SETTING_PARAMETERS set SP_VALUE='<LB_IP_address>' where SP_CONTEXT='platform' and SP_NAME='http.reverse.proxy.ip'

  6. Delete old server information from the CSA_SERVERS (Certificate Server Authority) tables on the event database.

    Run the following query on the event database:

    delete from CSA_SERVERS