Friday, February 1, 2013

[OBIEE 10g] Running IBots From Unix

 

Running iBots from Unix



This requirement is to trigger ibots based on Autosys jobs. Since, we can setup dependancy in between Autosys jobs and we can run Unix scripts from Autosys jobs, our problem boils down to triggering ibots from Unix script.



Create a test ibot as shown below:









Now, to trigger this ibot from Unix we have to use the saschinvoke  utility provided in OBIEE. The saschinvoke stands for Siebel Analytics Server Scheduler Invoke. The usage for the command is as below:




Usage:   SASchInvoke.exe -u <Admin Name>/<Admin Password>

                        (-j <job id> | -i <iBot path>)

                        ([-m <machine name>[:<port>]]

                        | -p <primaryCCS>[:<port>] -s <secondaryCCS>[:<port>])

                        ([(-r <replace parameter filename>

                            |-a <append parameter filename>)]

                         | [-x <re-run instance id>])

                        [-l

                         [-c <SSL certificate filename>

                          -k <SSL certificate private key filename>]

                         [-w <SSL passphrase>|-q <passphrase_file>|-y]

                         [-h <SSL cipher list>]

                         [-v

                          [-e <SSL verification depth>]

                          -d <CA certificate directory> | -f <CA certificate file>

                          [-t <SSL trusted peer CNs>]

                         ]

                        ]







Below is an example of a basic Unix script which takes in Job Id as a parameter and triggers the ibot for that particular job Id. 

#This script takes JobId as param and triggers respective iBot.
#param1=job_id
job_id=$1;
if [[ $# -lt 1 || $# -gt 1 ]] ; then                           # check number of parameters
echo "Invalid number of Parameters. Please enter a Job Id."
exit 1;
else
echo "Job Id entered:-" $job_id;
fi
if ! [[ "$job_id" =~ ^[0-9]+$ ]] ; then          # check whether the parameter is a number
echo "Please enter a valid Job Id";
else
`saschinvoke -u Administrator/password -j $job_id`  # invoke the iBot with specific job id        
echo "iBot successfully triggered";
fi
 

Save the above script on the OBIEE server and run it.


The above script can also be called from an Autosys job which can further be made dependant on other Autosys jobs.

 



No comments:

Post a Comment