Adding Oracle Database Instances Using the SnapProtect Command Line Interface

Use XML to add 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.

Procedure

  1. On the 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 Available XML Parameters for Oracle Instance Configuration.

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

    qoperation execute -af CreateInstance_Template.xml -appName 'oracle'-clientName '<client_name>' -instanceName '<dbname>' -dataArchiveGroup/storagePolicyName '<data_sp>' -commandLineStoragePolicy/storagePolicyName '<command_line_sp>' -logBackupStoragePolicy/StoragePolicyName '<log_sp>' -oracleHome '<oracle_home_dir>' -oracleUser/domainName '<domain_name>' -oracleUser/password '<password>' -oracleUser/userName '<oracle_user>' -sqlConnect/userName '<sql_user>' -sqlConnect/domainName '<sql_domain>' -sqlconnect/password '<sql_password>' -catalogConnect/domainName '<catalog domain_name>' -catalogConnect/userName '<catalog_user>'-catalogConnect/password '<catalog_password>'

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

Examples

Expand All

Creating an Instance with '/' as the Connect String

To create an instance with '/' as the database connect string, set the sqlConnect parameter in the following command:

Windows

qoperation execute -af CreateInstance_Template.xml -appName oracle -ClientName ganga -instanceName catalog -commandLineStoragePolicy/storagePolicyName atom_SP1 -logBackupStoragePolicy/StoragePolicyName basecs_SP1 -oracleHome D:\app\admin\product\11.2.0\dbhome_1 -oracleUser/domainName idcprodcert -oracleUser/password mypassword -oracleUser/userName admin -sqlConnect/userName '/' catalogConnect/domainName catalog -catalogConnect/userName rcat -catalogConnect/password rcat

UNIX

qoperation execute -af CreateInstance_Template.xml -appName oracle -clientName standrac -instanceName hari -logBackupStoragePolicy/storagePolicyName rhel_sp1 -oracleHome /u02/app/oracle/prodcut/11.2.0/dbhome -commandLineStoragePolicy/storagePolicyName rhel_snap_sp -oracleUser/userName oracle2 -sqlConnect/userName / -useCatalogConnect false

Creating an Instance with sys as the Connect String

To create instance with 'sys' as the database connect string, set the sqlConnect parameter in the following command:

qoperation execute -af CreateInstance_Template.xml -appName oracle -ClientName client1 -instanceName catalog -commandLineStoragePolicy/storagePolicyName atom_SP1 -logBackupStoragePolicy/StoragePolicyName basecs_SP1 –oracleHome D:\app\admin\product\11.2.0\dbhome_1 -oracleUser/domainName idcprodcert -oracleUser/password password -oracleUser/userName admin -sqlConnect/userName 'sys' -sqlConnect/domainName catalog -sqlconnect/password sys -catalogConnect/domainName catalog -catalogConnect/userName rcat -catalogConnect/password rcat

Creating an Instance with 'sys/pwd@tns' as the Connect String

To create instance on a UNIX client using 'sys/pwd@tns ' as the database connect string, set the sqlConnect parameter in the following command:

qoperation execute -af CreateInstance_Template.xml -appName oracle -clientName standrac -instanceName instance1 -logBackupStoragePolicy/storagePolicyName rhel_sp1 -oracleHome /u02/app/oracle/prodcut/11.2.0/dbhome -commandLineStoragePolicy/storagePolicyName rhel_snap_sp -oracleUser/userName oracle2 sqlConnect/domainName catalog -sqlConnect/userName sys -sqlConnect/password sys -useCatalogConnect false

What to Do Next

  • On the Oracle database host, edit the oratab file and add an entry for the added instance.