disable database droping sql
CREATE OR ALTER TRIGGER TRG_PreventDropProductionDB ON ALL SERVER FOR DROP_DATABASE AS BEGIN IF DB_NAME() = 'ProductionDatabase' BEGIN RAISERROR('You cannot drop the production database.', 16,1); ROLLBACK; END END GO
disable database droping sql
CREATE OR ALTER TRIGGER TRG_PreventDropProductionDB ON ALL SERVER FOR DROP_DATABASE AS BEGIN IF DB_NAME() = 'ProductionDatabase' BEGIN RAISERROR('You cannot drop the production database.', 16,1); ROLLBACK; END END GO
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us