Space banner

   

This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

Run Provisioning

The Run Provisioning tool enables you to run arbitrary provisioning actions on an object of any currently supported scope (for example, node, database, database instance, application, cluster, or cluster instance) in BMC Database Automation.

To use the tool, type the following command:

run_prov_job.pl <manager_fqn> <exec_id> <job_type> <xml_filename>

Command Line Argument

Description

manager_fqn

The DNS name or fully qualified domain name of the BMC Database Automation manager on which to perform the operation.

exec_id

A unique identifier provided by the caller which will be used for creation of the logfile. This can be used so that the caller can subsequently locate log files correlated to the instance of the program that called the command.

job_type

The type of job to be executed. Valid values include the following:

  • ApplyMssqlPatch
  • DB2::CreateInstance
  • DB2::RemoveInstance
  • DB2::ApplyPatch
  • Mssql::AddClusterInstance
  • Mssql::AddDatabase
  • Mssql::AddInstance
  • Mssql::AddNodeToClusterInstance
  • Mssql::RemoveClusterInstance
  • Mssql::RemoveDatabase
  • Mssql::RemoveInstance
  • Mssql::RemoveNodeFromClusterInstance
  • Oracle::AddInstance
  • Oracle::AddNode
  • Oracle::CreateCluster
  • Oracle::CreateDatabase
  • Oracle::RemoveCluster
  • Oracle::RemoveDatabase
  • Oracle::RemoveInstance
  • Oracle::RemoveNode
  • Oracle::RunPatch::Serial
  • Oracle::RunPatch::Parallel
  • Oracle::RunPatch::Rolling
  • RemoveMssqlPatch
  • Sybase::AddInstance
  • Sybase::ApplyPatch
  • Sybase::RemoveInstance
  • Sybase::Repserver::AddInstance
  • Sybase::Repserver::ApplyPatch
  • Sybase::Repserver::RemoveInstance

xml_filename

The name of the XML file which will provide the target list and custom input parameters to be passed to the provisioning operation.

Command Line Exit Value

Meaning

0

Success

1

Unknown error

2Failed to connect to manager
3

Invalid job type specified

4

XML input validation error

5One or more targets specified was invalid
6Provisioning command job failed
50Authentication failed: incorrect username/password
51Authorization failed: insufficient capability to perform operation

 

Note

The Stdout output is as follows:

jobid=321

errormsg=none

User examples

The following command runs a provisioning job to create an Oracle database on bdamgr.mycompany.com:8087 on May 30, 2013:

run_prov_job.pl https://bdamgr.mycompany.com:8087 2013-MAY-30 Oracle::CreateDatabase db.xml

The XML content to be passed in the xml_filename argument can be found by running an operation from the GUI and then retrieving the XML from the log package.

The environment variable GA_ASYNC_MODE can be used to further control the behavior of the run_prov_job.pl script:

GA_ASYNC_MODE Value

Behavior

sync or not defined

The manager will execute the pre-verification phase of the provisioning job synchronously and then, if it is successful, initiate the job. The script will then wait for the job to finish before displaying the provisioning job’s job ID and error messages.

skip_prescript

The manager will skip the pre-verification phase of the job and initiate the job immediately in the background. The script will then display the provisioning job’s job ID and the job’s current status (“not started”, “running”, “success”, "failed", “timeout”, “was running”, “canceled”, “expired”, “scheduled”, “approval pending”, “approval rejected” or “AO request”) and exit.

run_prescript

The manager will execute the pre-verification phase of the job synchronously and then, if it is successful, initiate the job in the background. The script will then display the provisioning job’s job ID and the job’s current status (“not started”, “running”, “success”, "failed", “timeout”, “was running”, “canceled”, “expired”, “scheduled”, “approval pending”, “approval rejected” or “AO request”) and exit.

In another example, the following command runs a provisioning job to apply a DB2 patch to bdamgr.mycompany.com:8087 on May 20, 2014:

run_prov_job.pl https://bdamgr.mycompany.com:80872014-MAY-20 DB2::ApplyPatch db.xml

Note

There is no DB2::RollbackPatch job type, because BMC Database Automation does not roll back DB2 patches. To accomplish this type of job, apply the desired version (for example, Apply FP2 to an instance that is at FP1), and then use DB2::ApplyPatch to apply FP1 to “rollback”.


 

Was this page helpful? Yes No Submitting... Thank you

Comments