1 Reply Latest reply on Jun 13, 2016 11:03 AM by jaminsql

    automating annotation creation in DPA when objects are changed in SQL

    tjk15

      I would like to have an annotation automatically created when objects (stored procedures, indexes, etc.) are created or changed.

       

      Does anyone already have a script to do that? Or, just point me to the DPA table(s) I will need to insert, and I can do it myself.

        • Re: automating annotation creation in DPA when objects are changed in SQL
          jaminsql

          tjk15,

           

          The table is CON_EVENTS. The table does have a DBID column and you would want to make sure that you fill this in with the ID of the monitored instance you want to insert the annotation on.

          This would be the ID from the COND table. "SELECT ID, NAME FROM COND;" will give you the ID of your  registered monitored instances.

          CON_EVENTS

          COLUMN

          ORACLE DATA TYPE

          SQL SERVER DATA TYPE

          NULLABLE

          DEFAULT VALUE

          PRIMARY KEY

          DESCRIPTION

          IDNUMBERBIGINTNOYesThe primary key ID. We will need a primary key generator.
          DBIDNUMBERSMALLINTNONoThe ID of the database that this event belongs to from the COND table.
          EVENT_DATEDATEDATETIMENONoThe time of the event down to the minute. This is the DPA server time.
          TITLENVARCHAR2(100)NVARCHAR(100)NONoThe title of the event.
          CREATORNVARCHAR2(50)NVARCHAR(50)YESNoThe user that created the annotation.
          DESCRIPTIONNVARCHAR2(2000)NVARCHAR(2000)YESNoA description of what was done.
          1 of 1 people found this helpful