1 2 Previous Next 18 Replies Latest reply on Feb 3, 2015 11:48 AM by Christopher Blanks

    BSA 8.5 SP1 - dbdiagnostics not reflecting DBMS_STATS after DBManager blGatherSchemaStats

    Christopher Blanks

      After running the following NSH script, dbdiagnostics reflects DBMS_STATS as "Last Analyzed date on the Database is NULL, which is NOT OK".  Has anyone run into this and have suggestions on its resolution?

       

      NSH Script:

      # CONNECT FOR BLCLI PERFORMANCE COMMANDS

      blcli_connect

       

      # GATHER DATABASE STATISTICS

      echo "\n[INFO] Gathering BL OM Database Statistics.\n"

      blcli_execute DBManager blGatherSchemaStats

      echo "\n[INFO] BL OM Database Statistics have been gathered.\n"

       

      # DISPLAY DB MANAGER STATUS (INFORMATIONAL)

      echo "\n[INFO] Gathering BL OM Database Status (Informational).\n"

      blcli_execute DBManager getDBManagerStatus

       

      # DISCONNECT FROM BLCLI PERFORMANCE COMMANDS

      blcli_disconnect

       

      # COLLECT INFORMATION REGARDING DATABASE STATISTICS

      echo "\n[INFO] Gathering BL OM Database Stats Information.\n"

      /u01/bmc/bladelogic/NSH/br/dbdiagnostics runDiag diagId=1000006

       

      # GET INFORMATION REGARDING DATABASE STATISTICS FROM LAST COLLECTION

      echo "\n[INFO] Displaying BL OM Database Stats Information.\n"

      STATSINFO=`/u01/bmc/bladelogic/NSH/br/dbdiagnostics getResLastExec diagId=1000006`

       

      # DISPLAY INFORMATION REGARDING DATABASE STATISTICS

      echo ${STATSINFO}

       

      # DETERMINE SUCCESSFUL EXIT BASED ON STATUS OF STATISTICS FROM DBDIAGNOSTICS

      echo ${STATSINFO} | grep "NOT OK" > /dev/null

      GOODSTATS=$?

      if [[ ${GOODSTATS} -ne 0 ]]

      then

         echo "\n[INFO] Statistics appear to be in good shape.  Exiting status 0."

         exit 0

      else

         echo "\n[ERROR] Statistics appear to have issues.  Please investigate.  Exiting status 1."

         exit 1

      fi

       

      Job Log:

      Info    11/12/2014 11:05:51    Started running the job 'Gather OM Database Statistics' with priority 'NORMAL' on application server 'crlnxp048_jobs'(2,002,100)

      Info    11/12/2014 11:05:52    Executing work item NSH Script Job:Gather OM Database Statistics;  on application server: crlnxp048_jobs

      Info    11/12/2014 11:06:00    [INFO] Gathering BL OM Database Statistics.

      Info    11/12/2014 11:07:51    void

      Info    11/12/2014 11:07:51    [INFO] BL OM Database Statistics have been gathered.

      Info    11/12/2014 11:07:51    [INFO] Gathering BL OM Database Status (Informational).

      Info    11/12/2014 11:07:51    Database Configuration Report

      Info    11/12/2014 11:07:51    ==============================

      Info    11/12/2014 11:07:51    Database Vendor = Oracle

      Info    11/12/2014 11:07:51    Database Release = Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

      Info    11/12/2014 11:07:51    With the Partitioning, OLAP, Data Mining and Real Application Testing options

      Info    11/12/2014 11:07:51    Database user = BLADELOGIC

      Info    11/12/2014 11:07:51    Connection URL = jdbc:oracle:thin:@crlnxp061:1538:clmp

      Info    11/12/2014 11:07:51    JDBC version = 11.2

      Info    11/12/2014 11:07:51    Database Driver Name = Oracle JDBC driver

      Info    11/12/2014 11:07:51    Driver class = oracle.jdbc.driver.OracleDriver

      Info    11/12/2014 11:07:51    Database Driver Version = 11.2.0.2.0

      Info    11/12/2014 11:07:51    [INFO] Gathering BL OM Database Stats Information.

      Info    11/12/2014 11:07:56    Run diagnostic id=1000006, and got execution id=2000140

      Info    11/12/2014 11:07:56    [INFO] Displaying BL OM Database Stats Information.

      Info    11/12/2014 11:08:00    diagId=1000006 execDiagId=2000140 execStartTime=2014-11-12 10:07:55.0 messageLevel=INFO message=DBMS_STATS_CHK: Last Analyzed date on the Database is NULL, which is NOT OK. The Expected running of DBMS_STATS is once in 15 days. Please run BL_GATHER_SCHEMA_STATS for this schema. messageTime=2014-11-12 10:07:56.0

      Info    11/12/2014 11:08:00    [ERROR] Statistics appear to have issues.  Please investigate.  Exiting status 1.

      Info    11/12/2014 11:08:00    Exit Code 1

      Error    11/12/2014 11:08:01    The job 'Gather OM Database Statistics' has failed

        1 2 Previous Next