cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 8

automating annotation creation in DPA when objects are changed in SQL

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.

Tags (1)
0 Kudos
3 Replies

If you have already created a script to do this with the table needed.  It would be awesome if you could share. I was about to dig into it and create a script.

0 Kudos
Level 12

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.

Thanks for that info I have been searching for that table.

0 Kudos