Loading...

Deleting DB2 Database Instances Using the SnapProtect Command Line Interface

Use XML to delete DB2 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 DB2 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 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 DeleteInstance_Template.xml -appName 'DB2 on Unix' -clientName 'client_name' -instanceName 'dbname'

    Windows

    qoperation execute -af DeleteInstance_Template.xml -appName 'DB2' -clientName 'client_name' -instanceName 'dbname'

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

Examples

Expand All

Deleting a Database Instance on UNIX

qoperation execute -af 'DeleteInstance_Template.xml' -appName 'DB2 on Unix' -clientName client_test -instanceName 'Instance1'

Deleting a Database Instance on Windows

qoperation execute -af 'DeleteInstance_Template.xml' -appName 'DB2' -clientName client_test -instanceName 'Instance1'