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.