Loading...

Creating a SQL Availability Group Client Using the Command Line Interface

If you have a SQL Availability Group, then you can use the command line interface to create a corresponding Commvault SQL Availability Group.

Before You Begin

  1. Retrieve the Availability Group information from SQL. For more information, see Retrieving SQL Availability Group Properties Using the Command Line Interface.
  2. Retrieve the SQL Availability Group replication information. For more information, see Retrieving SQL Availability Group Replication Information Using the Command Line Interface.

Procedure

  1. Run the qlogin command to log on to the CommServe computer.
  2. Download the createAGClient.xml file and save it on the computer from where you will run the command.
  3. Open the createAGClient.xml file file and update the XML parameters.
  4. On the command line, go to <Software_Installation_Directory>/Base and type the following command:

    qoperation execute -af createAGClient.xml

    For more information about the additional parameters, see XML Request Parameters for SQL Availability Group Operations.

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

Example

The following file creates a SQL availability group client called MSSQL_AG.

<App_CreatePseudoClientRequest>
 <clientInfo clientType="MSSQL_AG">
  <mssqlagClientProperties>
   <SQLServerInstance clientName="ida18" instanceName="IDA18"/>
   <availabilityGroup backupPreference="2" name="AvailabilityG1" primaryReplicaServerName="IDA18" uniqueId="36E7C0CB-8FA9-4C75-8E09-86896EBD3702">
    <SQLAvailabilityGroupListenerList availabilityGroupListenerName="ida18_19_Ag1"/>
   </availabilityGroup>
  <SQLAvailabilityReplicasList>
   <SQLAvailabilityReplicasList availabilityMode="1" backupPriority="71" connectionState="1" failoverMode="1" name="IDA18" role="1"/>
   <SQLAvailabilityReplicasList availabilityMode="1" backupPriority="50" connectionState="1" failoverMode="1" name="IDA19" role="2"/>
  </SQLAvailabilityReplicasList>
  </mssqlagClientProperties>
 </clientInfo>
 <entity clientName="testag1"/>
</App_CreatePseudoClientRequest>

Last modified: 11/6/2018 2:53:58 PM