Error : CREATE TRIGGER test ON DATABASE FOR ALTER_LOGIN

  • I failed to create trigger in a SQL 2005 environment:

    CREATE TRIGGER test01 ON DATABASE FOR ALTER_LOGIN

    AS BEGIN

    SET NOCOUNT ON;

    INSERT dbo.test03 (db_name, host_name, user_name, datetime)

    SELECT DB_NAME(), HOST_NAME(), SUSER_NAME, GETDATE();

    END

    Msg 1098, Level 15, State 1, Procedure test01, Line 8

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

    However, this one is OK:

    CREATE TRIGGER test01 ON DATABASE FOR ALTER_PROCEDURE

    AS

    Any ideal ?

    Thanks a lot.

  • Please ignore it.

    I fixed it.

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

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