Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What values are returned by event_data(EVENT_INSTANCE/objecttype)

Tags:

sql-server

I'm into SQL Server 2014 and working on eventdata(). I noticed that this event returns the object type, like 'PROCEDURE'. Is there a document that lists all the values that this "objectType" returns?

like image 288
Elmer Avatar asked Dec 01 '25 08:12

Elmer


1 Answers

The MSDN DDL Events page is probably what you want, but the page for EVENTDATA references the Microsoft SQL Server XML Schemas Web page which includes a link to the SQL Server Event Data Schema which will give you the definitive answer.

Within events.xsd ObjectType is defined as SSWNAMEType which is basically nvarchar(128), unfortunately not a choice type element. However, SQL Server has a very widely used 'object type' in sys.objects.type which should give you a start on the possible database level objects. Alternatively, look at the DDL Events and you might be able to infer the possible objects types from the event name.

like image 154
Rhys Jones Avatar answered Dec 04 '25 00:12

Rhys Jones



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!