March 11, 2009 at 9:43 am
Hi All,
Sorry if the topic already exists. I have a DDL trigger for Alter_Database and Drop_Database on all server. The trigger fires for Drop_Database, but is not fired for alter_Database.
Can anybody help me out in this issue or Is there any other alternative for handling this DDL event(ALTER_DATABASE) ?
Any help, greatly appreciated.
Thanks in Advance.
Regards
Priya
March 11, 2009 at 10:58 am
you'll need to paste the trigger in question, so we can see what the issue is.
Lowell
March 11, 2009 at 8:54 pm
Thanks for ur reply.
Create trigger tr_Prevent_DDL On All Server For Alter_Database, Drop_Database
As
begin
Print 'Restricted';
Rollback;
End
Go
This trigger fires for both the defined events. But It restricts the DROP_DATABASE but not the ALTER_DATABASE.
The message is printed if we alter the database but the changes made to the database is applied to it.
Is there any way we can prevent changes to the database with the DDL Trigger?
Regards
Priya
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply