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 |
---|---|
| The DNS name or fully qualified domain name of the BMC Database Automation manager on which to perform the operation. |
| 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. |
| The type of job to be executed. Valid values include the following:
|
| 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 |
---|---|
| Success |
| Unknown error |
2 | Failed to connect to manager |
3 | Invalid job type specified |
4 | XML input validation error |
5 | One or more targets specified was invalid |
6 | Provisioning command job failed |
50 | Authentication failed: incorrect username/password |
51 | Authorization 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 |
---|---|
| 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. |
| 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. |
| 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”.
Comments
Log in or register to comment.