Command Line Interface - Configuration - SAP Oracle iDataAgent

Table of Contents

XML Instance Configuration

Adding an Instance

Use the SnapProtect Command Line Interface to add SAP for Oracle database instances. Run the operation from the command line, or automate configuration by combining command line operations in a script.

You can include the XML parameters in the xml file, or you can specify them on the command line when they frequently change. For more information on command line parameters and XML elements, see Command Line - Syntax.

  1. On the SAP for Oracle 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 instance XML parameters, see SAP for Oracle XML Instance Parameters.

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

    Windows

    qoperation execute -af CreateInstance_Template.xml -appName 'SAP for Oracle' -clientName 'client_name' -instanceName 'instance_name' -oracleHome 'oracle_home_path' -sapDataPath 'sap_data_path' -sapExeFolder 'sap_exe_path' -oracleUser/domainName 'domain_name' -oracleUser/userName 'user_name' -oracleUser/password 'password' -sqlConnect/domainName 'oracle_service_name' -sqlConnect/userName 'sql_user_name' -sqlconnect/password 'sql_password' -commandLineStoragePolicy/storagePolicyName 'command_line_storage_policy' -logBackupStoragePolicy/StoragePolicyName 'log_storage_policy' -dataArchiveGroup/storagePolicyName 'data_storage_policy' -numberOfArchiveLogBackupStreams 'number_of_streams'

    UNIX

    qoperation execute -af CreateInstance_Template.xml -appName 'SAP for Oracle' -clientName 'client_name' -instanceName 'instance_name' -oracleHome 'oracle_home_path' -sapDataPath 'sap_data_path' -sapExeFolder 'sap_exe_path' -oracleUser/userName 'user_name' -oracleUser/password 'password' -sqlConnect/userName 'sql_user_name' -sqlConnect/domainName 'oracle_service_name' -sqlConnect/userName 'sql_user_name' -sqlconnect/password 'sql_password' -commandLineStoragePolicy/storagePolicyName 'command_line_storage_policy' -logBackupStoragePolicy/StoragePolicyName 'log_storage_policy' -dataArchiveGroup/storagePolicyName 'data_storage_policy' -numberOfArchiveLogBackupStreams 'number_of_streams'

Creating an Instance with sys as the Connect String

To create instance using sys as the connect string, use the 'sqlConnect' parameter to the following command:

On Windows Client

qoperation execute -af CreateInstance_Template.xml -appName 'SAP for Oracle' -clientName client1 -instanceName instance1 -oracleHome 'D:\app\admin\product\11.2.0\dbhome_1' -sapDataPath 'D:\app\CER' -sapExeFolder 'D:\app\CER\sys\exe\run' -oracleUser/userName 'oracle' -oracleUser/password 'oracle' -sqlConnect/domainName 'CER' -sqlConnect/userName 'sys' -sqlconnect/password 'sys' -commandLineStoragePolicy/storagePolicyName 'Sap_sp' -logBackupStoragePolicy/StoragePolicyName 'RTM_TEST' -dataArchiveGroup/storagePolicyName 'Sap_sp' -numberOfArchiveLogBackupStreams '3'

On UNIX Client

qoperation execute -af CreateInstance_Template.xml -appName 'SAP for Oracle' -clientName 'dbserveaix4' -instanceName 'CER' -oracleHome '/u01/app/112/dbhome' -sapDataPath '/u01/app/112/dbhome/CER' -sapExeFolder '/usr/sap/CER.10/SYS/exe/run' -oracleUser/userName 'oracle' -oracleUser/password 'oracle' -sqlConnect/domainName 'CER' -sqlConnect/userName 'sys' -sqlconnect/password 'sys' -commandLineStoragePolicy/storagePolicyName 'Sap_sp' -logBackupStoragePolicy/StoragePolicyName 'RTM_TEST' -dataArchiveGroup/storagePolicyName 'Sap_sp' -numberOfArchiveLogBackupStreams '3'

Creating an Instance with / as the Connect String

To create instance using / as the connect string, use the 'sqlConnect' parameter to the following command:

On Windows Client

qoperation execute -af CreateInstance_Template.xml -appName 'SAP for Oracle' -clientName client1 -instanceName instance1 -oracleHome 'D:\app\admin\product\11.2.0\dbhome_1' -sapDataPath 'D:\app\CER' -sapExeFolder 'D:\app\CER\sys\exe\run' --oracleUser/password 'oracle' -sqlConnect/domainName 'CER' -sqlConnect/userName '/' -sqlconnect/password 'sys' -commandLineStoragePolicy/storagePolicyName 'Sap_sp' -logBackupStoragePolicy/StoragePolicyName 'RTM_TEST' -dataArchiveGroup/storagePolicyName 'Sap_sp' -numberOfArchiveLogBackupStreams '3'

On UNIX Client

qoperation execute -af CreateInstance_Template.xml -appName 'SAP for Oracle' -clientName client1 -instanceName instance1 -oracleHome '/database/oracle114/app/oracle/product/11.2.0/dbhome_1' -sapDataPath '/database/oracle114/app/oracle/product/11.2.0/dbhome_1/CER' -sapExeFolder '/usr/sap/CER.11/SYS/exe/run' -oracleUser/userName user1 -sqlConnect/domainName 'CER' -sqlConnect/userName '/' -sqlconnect/password 'sys' -commandLineStoragePolicy/storagePolicyName 'Sap_sp' -logBackupStoragePolicy/StoragePolicyName 'RTM_TEST' -dataArchiveGroup/storagePolicyName 'Sap_sp' -numberOfArchiveLogBackupStreams '3'

Modifying an Instance

Use the SnapProtect Command Line Interface to modify SAP for Oracle database instance properties. Run the operation from the command line, or automate configuration by combining command line operations in a script.

You can include the XML parameters in the xml file, or you can specify them on the command line when they frequently change. For more information on command line parameters and XML elements, see Command Line - Syntax.

  1. On the SAP for Oracle Agent host, run the qlogin command to log on to the CommServe computer.
  2. Download the ModifyInstance_Template.xml file to the computer where you will run the command.
  3. Open the ModifyInstance_Template.xml file, add your specific parameters, and save the file.

    For information on supported instance XML parameters, see SAP for Oracle XML Instance Parameters.

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

    Windows

    qoperation execute -af ModifyInstance_Template.xml -appName 'SAP for Oracle' -clientName 'client_name' -instanceName 'instance_name' -oracleHome 'oracle_home_path' -sapDataPath 'sap_data_path' -sapExeFolder 'sap_exe_path' -oracleUser/domainName 'domain_name' -oracleUser/userName 'user_name' -oracleUser/password 'password' -sqlConnect/domainName 'oracle_service_name' -sqlConnect/userName 'sql_user_name' -sqlconnect/password 'sql_password' -commandLineStoragePolicy/storagePolicyName 'command_line_storage_policy' -logBackupStoragePolicy/StoragePolicyName 'log_storage_policy' -dataArchiveGroup/storagePolicyName 'data_storage_policy' -numberOfArchiveLogBackupStreams 'number_of_streams'

    UNIX

    qoperation execute -af ModifyInstance_Template.xml -appName 'SAP for Oracle' -clientName 'client_name' -instanceName 'instance_name' -oracleHome 'oracle_home_path' -sapDataPath 'sap_data_path' -sapExeFolder 'sap_exe_path' -oracleUser/userName 'user_name' -oracleUser/password 'password' -sqlConnect/userName 'sql_user_name' -sqlConnect/domainName 'oracle_service_name' -sqlConnect/userName 'sql_user_name' -sqlconnect/password 'sql_password' -commandLineStoragePolicy/storagePolicyName 'command_line_storage_policy' -logBackupStoragePolicy/StoragePolicyName 'log_storage_policy' -dataArchiveGroup/storagePolicyName 'data_storage_policy' -numberOfArchiveLogBackupStreams 'number_of_streams'

Modifying the Instance Storage Policy

qoperation execute -af ModifyInstance_Template.xml -appName 'SAP for Oracle' -clientName client1 -instanceName instance1 -commandLineStoragePolicy/storagePolicyName cli_SP1 -logBackupStoragePolicy/StoragePolicyName log_SP1

Modifying the Number of Streams for an Archive Log Backup

qoperation execute -af ModifyInstance_Template.xml -appName 'SAP for Oracle' -clientName client1 -instanceName CER -numberOfArchiveLogBackupStreams '10'

Deleting an Instance

Use the SnapProtect Command Line Interface to delete SAP for Oracle database instances. Run the operation from the command line, or automate configuration by combining command line operations in a script.

You can include the XML parameters in the xml file, or you can specify them on the command line when they frequently change. For more information on command line parameters and XML elements, see Command Line - Syntax.

Warning: If you do not include the clientName and instanceName parameters, the SnapProtect software deletes all SAP for Oracle instances in the CommCell Console.

  1. On the SAP for Oracle Agent host, run the qlogin command to log on to the CommServe computer.
  2. Download the deleteInstance_Template.xml file to the computer where you will run the command.
  3. Open the deleteInstance_Template.xml file, add your specific parameters, and save the file.

    For information on supported instance XML parameters, see SAP for Oracle XML Instance Parameters.

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

    qoperation execute -af deleteInstance_Template.xml -appName 'SAP for Oracle'  -clientName 'client_name' -instanceName 'instance_name'

Getting Instance Properties

Use the SnapProtect Command Line Interface to view SAP for Oracle database instance properties. Run the operation from the command line, or automate configuration by combining command line operations in a script.

Use this command to:

  • View the current SAP for Oracle database instance properties
  • View the SAP for Oracle database instance properties to verify the changes after using XML to modify the instance

You can include the XML parameters in the xml file, or you can specify them on the command line when they frequently change. For more information on command line parameters and XML elements, see Command Line - Syntax.

  1. On the SAP for Oracle Agent host, run the qlogin command to log on to the CommServe computer.
  2. Download the GetInstance_Properties_Template.xml file to the computer where you will run the command.
  3. Open the GetInstance_Properties_Template.xml file, add your specific parameters, and save the file.

    For information on supported instance XML parameters, see SAP for Oracle XML Instance Parameters.

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

    qoperation execute -af GetInstance_Properties_Template.xml -appName 'SAP for Oracle' -clientName 'client_name' -instanceName 'instance_name'

Subclient Configuration Using XML

Creating a Subclient

Use the SnapProtect Command Line Interface to create SAP for Oracle subclients. 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.

  1. On the SAP for Oracle Agent host, run the qlogin command to log on to the CommServe computer.
  2. Download the CreateSubclient.xml file to the computer where you will run the command.
  3. Open the CreateSubclient.xml file, add your specific parameters and save the file.

    For information on supported subclient XML parameters, see SAP for Oracle Subclient XML Parameters.

  4. On the command line, go to Software_Installation_Directory/Base and type the following command.
  5. qoperation execute –af create_subclient_template.xml -appName 'SAP for Oracle'  -clientName 'client_name' -instanceName 'instance_name' –subclientName 'subclient_name'

Examples

Expand All

Creating a Default Subclient

The following parameters are set when you create a subclient.

Parameter Value
sapBackupDevice RMAN_UTIL
sapBackupMode ONLINE
sapArchiveDelete true

qoperation execute –af create_subclient_template.xml -appName 'SAP for Oracle' -clientName 'saporavm2' -instanceName 'oratest' -subclientName 'test_cmd_sub1' -dataBackupStoragePolicy/storagePolicyName 'test_sap'

Creating a Subclient by Specifying the Device Type as 'UTIL_FILE'

qoperation execute –af create_subclient_template.xml -appName 'SAP for Oracle' -clientName 'saporavm2' -instanceName 'oratest' -subclientName 'test_cmd_sub2' -dataBackupStoragePolicy/storagePolicyName 'test_sap' -sapBackupDevice 'UTIL_FILE'

Creating a Subclient by Specifying the Device Type as'UTIL_FILE_ONLINE'

qoperation execute –af create_subclient_template.xml -appName 'SAP for Oracle' -clientName 'saporavm2' -instanceName 'oratest' -subclientName 'test_cmd_sub2' -dataBackupStoragePolicy/storagePolicyName 'test_sap' -sapBackupDevice 'UTIL_FILE'

Creating a Subclient with the Partial DB Option

qoperation execute –af create_subclient_template.xml -appName 'SAP for Oracle' -clientName 'saporavm2' -instanceName 'oratest' -subclientName 'test_cmd_sub6' -dataBackupStoragePolicy/storagePolicyName 'test_sap' -sapBackupDevice 'UTIL_FILE_ONLINE' -sapData 'true' -sapBackupMode 'ONLINE_SUBSET_DB' -contentOperationType ADD -content/sapForOracleDBContent/sapTableSpace 'USERS' -content/sapForOracleDBContent/sapdataFile '/database/Oracle/app/oracer/oradata/oratest/users01.dbf' Subclient deletion

Creating a Data Only Subclient

qoperation execute –af create_subclient_template.xml -appName 'SAP for Oracle' -clientName 'saporavm2' -instanceName 'oratest' -subclientName 'test_cmd_sub5' -dataBackupStoragePolicy/storagePolicyName 'test_sap' -sapBackupDevice 'UTIL_FILE_ONLINE' -sapBackupMode 'ONLINE_DB' -sapData 'true' -sapBackupArchiveLog 'false'

Creating a Log Only Subclient

qoperation execute –af create_subclient_template.xml -appName 'SAP for Oracle' -clientName 'saporavm2' -instanceName 'oratest' -subclientName 'test_cmd_sub5' -dataBackupStoragePolicy/storagePolicyName 'test_sap' -sapBackupDevice 'UTIL_FILE_ONLINE' -sapBackupMode 'ONLINE_DB' -sapData 'true' -sapBackupArchiveLog 'false'

Creating a Subclient with the Backup Archive Log and Disable Delete Archive Log Options

qoperation execute –af create_subclient_template.xml -appName 'SAP for Oracle' -clientName 'saporavm2' -instanceName 'oratest' -subclientName 'test_cmd_sub7' -dataBackupStoragePolicy/storagePolicyName 'test_sap' -sapBackupDevice 'UTIL_FILE_ONLINE' -sapData 'false' -sapBackupArchiveLog 'true' -sapArchiveDelete 'true'

Creating a Subclient with the Backup Archive Log and Archive Log Secondary Copy Options

qoperation execute –af create_subclient_template.xml -appName 'SAP for Oracle' -clientName 'saporavm2' -instanceName 'oratest' -subclientName 'test_cmd_sub7' -dataBackupStoragePolicy/storagePolicyName 'test_sap' -sapBackupDevice 'UTIL_FILE_ONLINE' -sapData 'false' -sapBackupArchiveLog 'true' -sapArchiveDelete 'false' -sapArchiveLogSecondCopy 'true'

Creating a Selective Online Full Subclient

qoperation execute –af create_subclient_template.xml -appName 'SAP for Oracle' -clientName 'saporavm2' -instanceName 'oratest' -subclientName 'test_cmd_sub8' -dataBackupStoragePolicy/storagePolicyName 'test_sap' -sapBackupDevice 'UTIL_FILE_ONLINE' -sapSelectiveOnlineFull 'true' -sapArchiveDelete 'false'

Modifying Subclient Properties

  1. Download the modify_subclient_template.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameters values.

qoperation execute –af modify_subclient_template.xml -appName 'SAP for Oracle' -clientName 'xxxxx' -instanceName 'xxxxx' –subclientName 'xxxxx'

Examples

Expand All

Rename a subclient

To rename the subclient set the following elements:

Parameter Value
subclientName The existing subclient name, in this example, "subclient1".
newName The new subclient name, in this example, "subclient1a".

qoperation execute –af modify_subclient_template.xml -appName 'SAP for Oracle' -clientName 'cn' -instanceName 'instance' –subclientName 'subclient1' -newName 'subclient1a'

Configure the Number of Backup Streams for a Subclient

To configure subclient set the following elements:

Parameter Value
numberOfBackupStreams The number of backup streams, in this example, "5".

qoperation execute –af modify_subclient_template.xml -appName 'SAP for Oracle' -clientName "saporavm1" -instanceName "TRD" -subclientName "util_data_only" -numberOfBackupStreams "5"

Getting Subclient Properties

  1. Download the get_subclient_properties_template.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameters values.

qoperation execute –af get_subclient_properties_template.xml -appName 'SAP for Oracle' -clientName 'client_name' -instanceName 'instance_name' –subclientName 'subclient_name'

Deleting a Subclient

Warning: If you do not include the clientName, instanceName and subclientName parameters, the SnapProtect software deletes all the user-created subclients. The default subclients are left intact.

  1. Download the delete_subclient_template.xml file and save it on the computer from where the command will be executed.
  2. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameters values.

qoperation execute -af delete_subclient_template.xml -appName 'SAP for Oracle'  -clientName 'client_name' -instanceName 'instance_name' –subclientName 'subclient_name'

Subclient Creation Using Scripts

Use the QS_CreateSAPOracleSubclient.sql to create a subclient and the SetSubClientProperty.sql script to modify subclient properties.

Creating SAP Oracle Selective Online Full Subclient

  1. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameters and parameter values.

    qoperation execscript -sn QS_CreateSAPOracleSubclient.sql -si client1 -si instance1 -si sp1 -si AUTO

  2. Enable the Selective Online Full option for Subclient

    qoperation execscript -sn SetSubClientProperty.sql -si 'c=client1' -si 'a=Q_SAP_ORADB' -si 'i=instance1' -si 'b=default' -si 's=AUTO' -si 'Oracle Online Selective Full' -si '1' -si '2'

Creating SAP Oracle Offline Subclient

  1. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameters and parameter values.

    qoperation execscript -sn QS_CreateSAPOracleSubclient.sql -si client1 -si instance1 -si sp1 -si AUTO

  2. Enable the offline option for Subclient

    qoperation execscript -sn SetSubClientProperty.sql -si 'c=client1' -si 'a=Q_SAP_ORADB' -si 'i=instance1' -si 'b=default' -si 's=AUTO' -si 'Oracle Backup Mode' -si '2'

Creating Log Only Subclient

  1. Execute the following command from the <Software_Installation_Directory>/Base folder after substituting the parameters and parameter values.

    qoperation execscript -sn QS_CreateSAPOracleSubclient.sql -si client1 -si instance1 -si sp1 -si AUTO

  2. Disable the Data option for Subclient

    qoperation execscript -sn SetSubClientProperty.sql -si 'c=client1' -si 'a=Q_SAP_ORADB' -si 'i=instance1' -si 'b=default' -si 's=AUTO' -si 'Oracle Backup Mode' -si '1' –si ‘2’

  3. Disable the Delete Archive Log option

    qoperation execscript -sn SetSubClientProperty.sql -si 'c=client1' -si 'a=Q_SAP_ORADB' -si 'i=instance1' -si 'b=default' -si 's=AUTO' -si 'Archive Log Deleting' -si '0' -si '2’

Log Off from the CommServe

Once you have completed the command line operations, you can logout from the CommServe using the following command:

qlogout -cs commserve

For example, to log out from the CommServe 'Server1'.

qlogout -cs Server1