SQL Server'da Tetikleyiciler Oluşturma ve Optimize Etme
Florin Angelescu
Instructor
DROP TRIGGER PreventNewDiscounts;

DROP TRIGGER PreventNewDiscounts;
DROP TRIGGER PreventViewsModifications
ON DATABASE;


DROP TRIGGER PreventNewDiscounts;
DROP TRIGGER PreventViewsModifications
ON DATABASE;
DROP TRIGGER DisallowLinkedServers
ON ALL SERVER;



DISABLE TRIGGER PreventNewDiscounts
ON Discounts;
DISABLE TRIGGER PreventViewsModifications
ON DATABASE;
DISABLE TRIGGER DisallowLinkedServers
ON ALL SERVER;



ENABLE TRIGGER PreventNewDiscounts
ON Discounts;
ENABLE TRIGGER PreventViewsModifications
ON DATABASE;
ENABLE TRIGGER DisallowLinkedServers
ON ALL SERVER;



CREATE TRIGGER PreventDiscountsDelete
ON Discounts
INSTEAD OF DELETE
AS
PRINT 'Discounts tablosundan veri silmenize izin verilmiyor.';
DROP TRIGGER PreventDiscountsDelete;
CREATE TRIGGER PreventDiscountsDelete
ON Discounts
INSTEAD OF DELETE
AS
PRINT 'Discounts tablosundan veri kaldırmanıza izin verilmiyor.';
CREATE TRIGGER PreventDiscountsDelete
ON Discounts
INSTEAD OF DELETE
AS
PRINT 'Discounts tablosundan veri silmenize izin verilmiyor.';
ALTER TRIGGER PreventDiscountsDelete
ON Discounts
INSTEAD OF DELETE
AS
PRINT 'Discounts tablosundan veri kaldırmanıza izin verilmiyor.';
SQL Server'da Tetikleyiciler Oluşturma ve Optimize Etme