"ALL SERVER" option for DDL trigger

  • Hi,

    Can anyone help me for this...

    I tried to create a DDL triger for "ALL SERVER" option.

    here is my code...

    Create Trigger Trigger_table_DDL

    on ALL SERVER

    for

    create_table, drop_table, alter_table

    as

    Insert into [dbo].[track_table]

    ( [datachange]) ---- this is XML datatype and not null column

    Values (eventdate())

    GO

    it returns the following error message....

    ****************

    Msg 1098, Level 15, State 1, Procedure Trigger_table_DDL, Line 12

    The specified event type(s) is/are not valid on the specified target object.

    *********************

    Thanks in advance...

    Nithiyanandam.S

  • You might want a much better solution. See http://qa.sqlservercentral.com/Forums/Topic947481-391-1.aspx

  • hi sean,

    Thanks for your reply. thanks lot

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply