Adding DB2 Instances Using the Commvault 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.xml file to the computer where you will run the command.

  3. Open the CreateInstance.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 command.

    UNIX

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

    Windows

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

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

Examples

Adding an Instance in a UNIX Environment

The following command creates an instance that is named db2inst5 in a UNIX environment. In this example, the parameters are listed on the command line.

qoperation execute -af CreateInstance.xml -appName 'DB2 on Unix' -instanceName 'db2inst5' -description 'inst - db2_instance' -clientName 'db2_client' -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 Windows Environment

The following command creates an instance that is named db2inst5 in a Windows environment. In this example, the parameters are listed on the command line.

qoperation execute -af CreateInstance.xml -appName 'DB2' -instanceName 'db2inst5' -description 'inst - db2_instance' -clientName 'db2_client' -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'

Loading...