2 Replies Latest reply on Mar 14, 2014 1:53 AM by 391130

    DDL Definition of the WLDF Tables for Oracle DB

    391130

      There is a 2012 thread asking this question; now archived.

       

      For the benefit of others searching for this information in general & particularly against 10.3.x series Weblogic

       

      See the 12.1.2. WLDF doco >>

       

      http://docs.oracle.com/middleware/1212/wls/WLDFC/config_diag_archives.htm#CHDFACJE

       

      Mind you the logic of the code seems mildly flawed - why collect a count & then not use it in the first collection of statements?

      I would expect the top 'WLS_EVENTS' collection of creates should also be wrapped in

       

      IF vCtr = 0 THEN

       

       

      Cheers

        • 1. Re: DDL Definition of the WLDF Tables for Oracle DB
          391130

          I take that back - it's not mildly flawed; it's terribly flawed.  The SQL in the "official Oracle doco" may work after a few minor corrections but it will not enable a valid JDBC Diagnostic Archive.

           

          See this reference for a legitimate method >> http://www.packtpub.com/article/monitoring-welogic-server-12c

           

          Mucho kudos to the book: Oracle WebLogic Server 12c Advanced Administration Cookbook

          and the author by Dalton Iwazaki

          • 2. Re: DDL Definition of the WLDF Tables for Oracle DB
            391130

            One final small problem.  According to sql in Dalton's book - the wlsevents table, DYES column is TIMESTAMP.  That is not correct & will cause data type mismatch errors when trying to harvest instrumentation events.  The column needs to be NUMBER instead.  I am working with WLS 10.3.6. but I don't think that has changed across versions - so is same for 12c.

             

            Cheers

             

            So the final SQL that worked for me is >>

             

            DROP TABLE WLS_EVENTS;
            CREATE TABLE WLS_EVENTS (
            RECORDID number NOT NULL,
            TIMESTAMP number default NULL,
            CONTEXTID varchar2(128) default NULL,
            TXID varchar2(32) default NULL,
            USERID varchar2(32) default NULL,
            TYPE varchar2(64) default NULL,
            DOMAIN varchar2(64) default NULL,
            SERVER varchar2(64) default NULL,
            SCOPE varchar2(64) default NULL,
            MODULE varchar2(64) default NULL,
            MONITOR varchar2(64) default NULL,
            FILENAME varchar2(64) default NULL,
            LINENUM number default NULL,
            CLASSNAME varchar2(250) default NULL,
            METHODNAME varchar2(64) default NULL,
            METHODDSC varchar2(4000) default NULL,
            ARGUMENTS clob default NULL,
            RETVAL varchar2(4000) default NULL,
            PAYLOAD blob default NULL,
            CTXPAYLOAD varchar2(4000),
            DYES number default NULL,
            THREADNAME varchar2(128) default NULL
            );

            DROP TABLE WLS_HVST;
            CREATE TABLE WLS_HVST (
            RECORDID number NOT NULL,
            TIMESTAMP number default NULL,
            DOMAIN varchar2(64) default NULL,
            SERVER varchar2(64) default NULL,
            TYPE varchar2(64) default NULL,
            NAME varchar2(250) default NULL,
            ATTRNAME varchar2(64) default NULL,
            ATTRTYPE number default NULL,
            ATTRVALUE varchar2(4000)
            );

            DROP SEQUENCE MON_EVENTS;
            CREATE SEQUENCE MON_EVENTS
            START WITH 1
            INCREMENT BY 1
            NOMAXVALUE;

            DROP TRIGGER TRIG_EVENTS;
            CREATE TRIGGER TRIG_EVENTS
            BEFORE INSERT ON WLS_EVENTS
            FOR EACH ROW
            BEGIN
              SELECT MON_EVENTS.NEXTVAL INTO :NEW.RECORDID FROM DUAL;
            END;
            /

            DROP SEQUENCE MON_HVST;
            CREATE SEQUENCE MON_HVST
            START WITH 1
            INCREMENT BY 1
            NOMAXVALUE;

            DROP TRIGGER TRIG_HVST;
            CREATE TRIGGER TRIG_HVST
            BEFORE INSERT ON WLS_HVST
            FOR EACH ROW
            BEGIN
              SELECT MON_HVST.NEXTVAL INTO :NEW.RECORDID FROM DUAL;
            END;
            /