Thursday, October 17, 2013

How to stop any user from dropping any database



How to stop any user from dropping any database


you can prevent casual database deletions with a trigger:

CREATE TRIGGER STOP_DB_DROP
ON ALL SERVER
FOR DROP_DATABASE
AS
PRINT 'You are not allowed to DROP databases'
ROLLBACK;

2 comments:

  1. Is this create trigger statement will work on SQL server?

    ReplyDelete
  2. Thanks for the fantastic educational points - That's really amazing tour arrangements.

    Online Flight Booking | Low Cost Flights Tickets

    ReplyDelete