Oracle Compute Statistics Script

Version 2

    The attached shell script can be used to compute statistics in Oracle against the Core and Reports BladeLogic databases. 


    To do so, add the script into Configuration Manager as a NSH script set it to copy and execute remotely against the target host (the third option for non-NSH scripts).  Then add a parameter for SID, core DB name, and reports DB name.


    The script can then be scheduled to run on a regular basis.


    NOTE: This script assumes you have an agengt on your database server and you are mapped to root, due to the use of a 'su' to the oracle user.


    Parameter usage is as follows:



    I have also attached an updated version of this script, which does not require root access to the target server.  This is helpful when your database server is also the same as your app server, and you are running the script while mapped to 'bladmin'.  The only requirement is that you add 'bladmin' to your database group.


    Parameter usage for this script is as follows: