Monday, 9 May 2011

Enabling all disabled triggers in SQL Server


select 'ALTER TABLE ' + o.name + ' ENABLE TRIGGER ' + s.name
from sys.objects o
inner join sys.triggers s on s.parent_id = o.object_id
and s.is_disabled = 1

No comments:

Post a Comment

Android mediaserver process killing battery life

If this happens to you, then do the following Force stop on Settings, Applications, All, Media Storage. Clear Cache and Clear Data, fo...