IBM Tivoli Storage FlashCopy Manager for UNIX and Linux, Version 4.1

Configuration files used for cloning

Information is provided about configuration files for use with FlashCopy® cloning.

Tivoli® Storage FlashCopy Manager uses preprocessing and postprocessing configuration files during cloning operations (for example /oracle/P01/acs/preprocessing.ini). The functions that are provided by the processing scripts depend on the cloning environment where they are issued. All processing configuration files and the scripts that are defined in the configuration files must meet the following requirements:
Attention: If a write access level for the World user group is given, there is a security risk.
When adding processing configuration files, place each script on a separate line as shown in the following example:
/oracle/P01/acs/scripts/PreProcessing_stopsap.sh 
/oracle/P01/acs/scripts/PreProcessing_stopdb.sh 
Both processing configuration files support embedded user comments. A comment line in the configuration file is denoted by the number sign character: #. The scripts are specified with fully qualified file names. Each line of the processing configuration file represents one processing script. The FlashCopy Manager Offload Agent, tsm4acs, uses these arguments and their values when calling the scripts:
DBNAME_PROD
The database name on the production system.
DBNAME_CLONE
The database name on the cloning system.
DBHOST_PROD
The host name of the production system.
DBHOST_CLONE
The host name of the cloning system.
CLONE_TIMESTAMP
The timestamp when the clone was created. This entry is also the time when the production database is suspended and the FlashCopy operation begins. The timestamp format is YYYYMMDDhhmmss. During preprocessing, the timestamp identifies when the previous FlashCopy clone is created. During postprocessing, the timestamp identifies when the current FlashCopy clone was created.
SCHEMA
The database schema of the production database as specified by the profile parameter DATABASE_SCHEMA. Depending on SAP Kernel release, this schema is SAPR3 or SAPDBname.
You can use the following processing scripts:
The processing scripts that are defined in the processing configuration files run sequentially. The return code of each script is validated. The following values are used:
RC=0
Processing ends successfully. If this script is the last script to be run, continue cloning. If this script is not the last script, continue with the next script.
RC=1
Processing ends successfully with warning. If this script is the last script to be run, continue cloning. If this script is not the last script, continue with the next script.
RC=2
Processing ends with an error. Cloning immediately stops. No additional scripts run.
The return code for each script is written to the cloning log files. The output is written to dedicated log files with the following file names:
clone_preproc.<timestamp>
clone_postproc.<timestamp>

Processing example: Cloning configuration files

In the following processing example, the production database is named P01, and the clone database is named C01:
./fcmcli -f preproc_clone -u db2c01 -C C01 -X /oracle/C01/acs/preprocessing.ini
./fcmcli -f postproc_clone -u db2c01 -C C01 -Y /oracle/C01/acs/postprocessing.ini
If a processing script needs additional command-line options, add these options to each line of the configuration file. In this example, the additional command-line argument LC01 is added to the script entry in the configuration file:
/oracle/C01/acs/scripts/PostProcessing_startListener.sh LC01
The Tivoli Storage FlashCopy Manager command-line interface issues a call to the processing script with the six default arguments. After these arguments are provided, additional command-line options are sent. In this example, the additional command-line argument LC01 is passed to the PostProcessing_startListener.sh script as the seventh argument:
#!/bin/ksh
# FOLLOWING ACTIONS ARE PERFORMED ---------------------------------------------
# start the Oracle Listener

DBNAME_PROD=$1
DBNAME_CLONE=$2
DBHOST_PROD=$3
DBHOST_CLONE=$4
CLONE_TIMESTAMP=$5

# ${SCHEMA} is schema owner (for SAP Kernel > 6.10, for userid other than SAPR3)
SCHEMA=$6
SCHEMA=$(echo ${SCHEMA} | tr [a-z] [A-Z])

# ${LISTENER} is the name of the listener to be started (taken from listener.ora)
LISTENER=$7

lsnrctl start ${LISTENER}
If a DB2 SQL script needs additional command-line options, use a shell script as a wrapper with the DB2 SQL commands. Tivoli Storage FlashCopy Manager requires that the DB2 SQL script use a semicolon delimiter: ;. If another delimiter character is specified, use another shell script wrapper that calls the DB2 SQL script with the correct delimiter character in the command-line entry. This example shows a shell script wrapper that specifies the correct delimiter character:
#/bin/ksh
DELIMITER=#
db2 -td${DELIMITER} -svf PostProcessing_script1.sql


Feedback