A Moving from a Test to Production Environment

This appendix describes how to move an Oracle GoldenGate Veridata installation from a test environment (a source environment) to a production environment (a target environment).

This appendix includes the following sections:

A.1 Moving Installations from a Source Environment to a Target Environment

Oracle Fusion Middleware provides various scripts that you use to move your environment.

To move Oracle Home that contains all binary files of your Veridata installation, use the copyBinary and pasteBinary scripts. After moving the Oracle Home, use the copyConfig and pasteConfig scripts to move a copy of the Veridata domain configuration including the Administration Server, Managed Server, and other components in the domain to the target environment.

Note:

Test to production migration is not supported for a compact domain or for repository databases other than Oracle.

For more information about using these scripts, see "Common Procedures for Moving to a Target Environment" in Administering Oracle Fusion Middleware.

A.2 Additional Steps for Moving Oracle GoldenGate Veridata Repository

In addition to the common procedures described in the guide Administering Oracle Fusion Middleware, follow the instructions below for moving the Oracle GoldenGate Veridata repository to a target environment:

A.2.1 Moving Veridata Configuration Data from Test to Production

To export and import Veridata repository configuration data, use the scripts available in the ORACLE_HOME/veridata/t2p/scripts directory.

Note:

You must have the tools sqlplus, impdp, and expdb installed on the system where you run the scripts.

To export the repository from the test environment, run the script as follows:

ORACLE_HOME/veridata/t2p/scripts/oracle_exp_imp.sh  --export --dba_user system --db_inst
ora11203 --vdt_user DEV31_VERIDATA --work_dir /tmp/work1

To import the repository to the production environment, run the script as follows:

ORACLE_HOME/veridata/t2p/scripts/oracle_exp_imp.sh  --import --dba_user system --db_inst ora11203--vdt_user DEV32_VERIDATA --work_dir /tmp/work1

Table A-1 describes the arguments you specify while running the oracle_exp_imp.sh/oracle_exp_imp.bat script.

Table A-1 Arguments for the Veridata Test to Production Scripts

Argument Description

export

Indicates that the script is exporting Veridata data from the test environment.

import

Indicates that the script is importing Veridata data to the production environment.

dba_user <user_name>

Specifies a database user with DBA privileges.

db_inst <oracle_sid>

Specifies the database connect descriptor name, basically defined in the $TNS_ADMIN/tnsnames.ora file.

vdt_user <veridata_user>

Specifies the Veridata user or schema name for which the export or import is being done.

work_dir <work_dir>

Specifies the temporary directory for database dump and to save logs.

pwd_file <dba password file>

Specifies the file that contains the DBA user password.


A.2.2 Applying Configuration Changes while Moving from Test to Production

While moving from a test to production environment, if there are any configuration changes for the Veridata Agent such as host and port changes OR if there is any schema or catalog name changes in the compare pairs, execute the following statements as appropriate to your database:

For all databases:

UPDATE TABLE_INFO set SRC_SCHEMA_NAME =  production_source_schema WHERE SRC_SCHEMA_NAME = test_source_schema
UPDATE TABLE_INFO set TARG_SCHEMA_NAME =  production_target_schema WHERE TARG_SCHEMA_NAME = test_target_schema

For SQL Server and Sybase databases:

UPDATE TABLE_INFO set SRC_CATALOG_NAME =  production_source_catalog WHERE SRC_CATALOG_NAME = test_source_catalog
UPDATE TABLE_INFO set TARG_CATALOG_NAME =  production_target_catalog WHERE TARG_CATALOG_NAME = test_target_catalog

For NSK:

Update the table names in the COMPARE_PAIR table to replace the test node names and disk volume names with the production names.

The statements for various database repositories are given below.

For Oracle:

Update COMPARE_PAIRS SET  SRC_TABLE_NAME = '\SPROD.$PDATA' || SUBSTR(SRC_TABLE_NAME, 12) Where SRC_TABLE_NAME like '\STEST.TDATA%'
Update COMPARE_PAIRS SET  TARG_TABLE_NAME = '\TPROD.$PDATA' ||
    SUBSTR(TARG_TABLE_NAME, 12) Where TARG_TABLE_NAME like '\TTEST.TDATA%'

For SQL Server:

Update COMPARE_PAIRS SET  SRC_TABLE_NAME = '\SPROD.$PDATA' +
    SUBSTRING(SRC_TABLE_NAME, 12, LEN(SRC_TABLE_NAME) -  12) Where SRC_TABLE_NAME
    like '\STEST.TDATA%'

Update COMPARE_PAIRS SET  TARG_TABLE_NAME = '\TPROD.$PDATA' +
    SUBSTRING(TARG_TABLE_NAME, 12, LEN(TARG_TABLE_NAME) -12) Where TARG_TABLE_NAME
    like '\TTEST.TDATA%'

For MYSQL:

Update COMPARE_PAIRS SET  SRC_TABLE_NAME = CONCAT( '\SPROD.$PDATA' ,
    SUBSTRING(SRC_TABLE_NAME, 12)) Where SRC_TABLE_NAME like '\STEST.TDATA%'

Update COMPARE_PAIRS SET  TARG_TABLE_NAME = CONCAT('\TPROD.$PDATA',
    SUBSTRING(TARG_TABLE_NAME, 12)) Where TARG_TABLE_NAME like '\TTEST.TDATA%'

A.2.3 Modifying the Agent details in the Production Environment

Update the Veridata Agent details in the CONNECTIONS table of the production environment host as described below:

  • If only the Agent host name needs to be changed, update the database as follows:

    Update CONNECTIONS set MGR_NAME = 'prod host' where MGR_NAME 'test host'
    
  • If there are more changes to the Veridata Agent, such as changes to the port number, User ID, password, and Repair User ID, then you should start the Veridata application and update the environment using the UI or command-line tool. Start the Veridata agent after making these changes.

For example, create an xml as below:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration SYSTEM
"http://@VeridataServerHost@:@veridataServerPort@/veridata/configuration.dtd">
    <configuration validation="required">
    <connection name="@conneciotnName@" host="@sqlManagerHostSrc@" 
        port="@sqlManagerPortSrc@" user="@sqlConn0User@"
        password="@sqlConn0Password@" repairUser="@repairUsername@"
        repairPassword="@repairPassword@" agent-timeout="4000" 
        truncate-spaces="false" fetch-size="3" use-ssl="false">
           <description>
            <![CDATA[
                SQL Scripting Source Connection
            ]]>
            </description>
   </connection>
   </configuration>

VERIDATA_DOMAIN_HOME/veridata/bin/veridata_scripting.sh -update /tmp/con.xml -wlUser <cmd user>