Loading...

Adding DB2 Instances Using the SnapProtect Command Line Interface

Use XML to add DB2 instances. Run the operation from the command line, or automate configuration by combining command line operations in a script.

The XML parameters can be included in the XML file, or specified on the command line when they frequently change. For more information on command line parameters and XML elements, see Command Line - Syntax.

Procedure

  1. On the DB2 Agent host, run the qlogin command to log on to the CommServe computer.

  2. Download the CreateInstance_Template.xml file to the computer where you will run the command.
  3. Open the CreateInstance_Template.xml file, add your specific parameters and save the file.

    For information on supported subclient XML parameters, see Available XML Parameters for DB2 Instance Configuration.

  4. On the command line, go to Software_Installation_Directory/Base and type the following command.

    UNIX

    qoperation execute -af CreateInstance_Template.xml -instanceName '<db2instance_name>' -description '<description>' -clientName '<client_name>'-appName 'DB2 on Unix'  -commandLineStoragePolicy/storagePolicyName 'command_line_storage_policy' -logBackupStoragePolicy/storagePolicyName 'log_line_storage_policy' -dataBackupStoragePolicy/storagePolicyName 'data_storage_policy'

    Windows

    qoperation execute -af CreateInstance_Template.xml -instanceName '<db2instance_name>' -description '<description>' -clientName '<client_name>'-appName 'DB2'  -commandLineStoragePolicy/storagePolicyName 'command_line_storage_policy' -logBackupStoragePolicy/storagePolicyName 'log_line_storage_policy' -dataBackupStoragePolicy/storagePolicyName 'data_storage_policy' -domainName '<domain_name>' -userName '<user_name>' -password '<password>' -homeDirectory '<home_directory>'

  5. Run the qlogout command to log off the CommServe computer.

Examples

Expand All

Adding an Instance in a Windows Environment

To add an instance, set the following parameters:

Parameter Value
instanceName The instance name. In this example, 'db2inst5'.
description The instance description. In this example, 'instance description'.
clientName The DB2 client name. In this example, 'db2_client'.
appName In this example, 'DB2'.
encryptionFlag Enable compression on the client or MediaAgent computer. In this example, 'ENC_NETWORK_AND_MEDIA'.
generateSignature The location of the deduplication signature. In this example, 'ON_CLIENT'.
networkAgents The number of network agents. IN this example, '3'.
softwareCompression The location where you want to enable software compression.  In this example, 'USE_STORAGE_POLICY_SETTINGS'.
throttleNetworkBandwidth 'Enhance backup performance by reducing network bandwidth overhead. In this example, '250'.
commandLineStoragePolicy/storagePolicyName The command line storage policy. In this example, 'SP_LIB2'.
logBackupStoragePolicy/storagePolicyName 'The log backup storage policy. In this example, 'SP4'.
dataBackupStoragePolicy/storagePolicyName 'The data backup storage policy. In this example, 'SP3'.
domainName 'The domain name. In this example, 'db2_test_domain'.
userName The DB2 user. In this example, 'db2user'
password The DB2 user's password. In this example, '1234'.
homeDirectory The DB2 application home directory. In this example, 'E:\DB2V9.7\SQLLIB'.
userGroupName The user group. In this example 'test2'.
associatedUserGroupsOperationType The option to add or delete the user group. In this example, 'ADD'.

qoperation execute -af C:\XML\CreateInstance_Template.xml -instanceName 'db2inst5' -description 'inst - db2_instance' -clientName 'db2_client' -appName 'DB2' -encryptionFlag 'ENC_NETWORK_AND_MEDIA' -generateSignature 'ON_CLIENT' -networkAgents 3 -softwareCompression 'USE_STORAGE_POLICY_SETTINGS' -throttleNetworkBandwidth '250' -commandLineStoragePolicy/storagePolicyName 'SP_LIB2' -logBackupStoragePolicy/storagePolicyName 'SP4' -dataBackupStoragePolicy/storagePolicyName 'SP3' -domainName 'db2_test_domain' -userName 'db2user' -password '1234' -homeDirectory 'E:\DB2V9.7\SQLLIB' -userGroupName 'test2' -associatedUserGroupsOperationType 'ADD'

Adding an Instance in a UNIX Environment

To add an instance, set the following parameters:

Parameter Value
instanceName The instance name. In this example, 'db2inst5'.
description The instance description. In this example, 'instance description'.
clientName The DB2 client name. In this example, 'db2_client'.
appName In this example, 'DB2 on Unix'.
encryptionFlagappNam Enable compression on the client or MediaAgent computer. In this example, 'ENC_NETWORK_AND_MEDIA'.
generateSignature The location of the deduplication signature. In this example, 'ON_CLIENT'.
networkAgents The number of network agents. IN this example, '3'.
softwareCompression The location where you want to enable software compression.  In this example, 'USE_STORAGE_POLICY_SETTINGS'.
throttleNetworkBandwidth 'Enhance backup performance by reducing network bandwidth overhead. In this example, '250'.
commandLineStoragePolicy/storagePolicyName The command line storage policy. In this example, 'SP_LIB2'.
logBackupStoragePolicy/storagePolicyName 'The log backup storage policy. In this example, 'SP4'.
dataBackupStoragePolicy/storagePolicyName 'The data backup storage policy. In this example, 'SP3'.
userName The DB2 user. In this example, 'db2user'
password The DB2 user's password. In this example, '1234'.
homeDirectory The DB2 application home directory. In this example, '/usr/tmp/DB2V9.7/SQLLIB'.
userGroupName The user group. In this example 'test2'.
associatedUserGroupsOperationType The option to add or delete the user group. In this example, 'ADD'.

qoperation execute -af C:\XML\CreateInstance_Template.xml -instanceName 'db2inst5' -description 'inst - db2_instance' -clientName 'db2_client' -appName 'DB2 on Unix' -encryptionFlag 'ENC_NETWORK_AND_MEDIA' -generateSignature 'ON_CLIENT' -networkAgents 3 -softwareCompression 'USE_STORAGE_POLICY_SETTINGS' -throttleNetworkBandwidth '250' -commandLineStoragePolicy/storagePolicyName 'SP_LIB2' -logBackupStoragePolicy/storagePolicyName 'SP4' -dataBackupStoragePolicy/storagePolicyName 'SP3'  -userName 'db2user' -password 'xxxx' -homeDirectory '/usr/tmp/DB2V9.7/SQLLIB' -userGroupName 'test2' -associatedUserGroupsOperationType 'ADD'