星期四, 8月 24, 2017

[SQL] Trigger 狀態查詢

利用 TSQL 語法來查詢 Trigger 和其狀態
SELECT 
    T.name AS TableName ,
    tr.name AS TriggerName ,
    tr.is_ms_shipped ,
    tr.is_disabled ,
    tr.is_not_for_replication ,
    tr.is_instead_of_trigger
FROM sys.triggers AS tr
    JOIN sys.objects AS O ON tr.[object_id] = O.[object_id]
    JOIN sys.tables AS T ON O.parent_object_id = T.[object_id]
[SQL] Trigger 狀態查詢

沒有留言:

張貼留言