<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: SQL SERVER - Disable All the Trigger of Current Database</title>
	<atom:link href="http://blog.sqlauthority.com/2008/08/19/sql-server-disable-all-the-trigger-of-current-database/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2008/08/19/sql-server-disable-all-the-trigger-of-current-database/</link>
	<description>Notes of a SQL Server MVP and Database Administrator</description>
	<pubDate>Wed, 07 Jan 2009 19:37:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: rohit</title>
		<link>http://blog.sqlauthority.com/2008/08/19/sql-server-disable-all-the-trigger-of-current-database/#comment-43181</link>
		<dc:creator>rohit</dc:creator>
		<pubDate>Tue, 23 Sep 2008 21:29:11 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=854#comment-43181</guid>
		<description>How about using this
sp_msforeachtable "ALTER TABLE ? DISABLE TRIGGER  all"
sp_msforeachtable "ALTER TABLE ? ENABLE TRIGGER  all"</description>
		<content:encoded><![CDATA[<p>How about using this<br />
sp_msforeachtable &#8220;ALTER TABLE ? DISABLE TRIGGER  all&#8221;<br />
sp_msforeachtable &#8220;ALTER TABLE ? ENABLE TRIGGER  all&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rama Krishna.K.S.</title>
		<link>http://blog.sqlauthority.com/2008/08/19/sql-server-disable-all-the-trigger-of-current-database/#comment-42849</link>
		<dc:creator>Rama Krishna.K.S.</dc:creator>
		<pubDate>Tue, 16 Sep 2008 10:08:54 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=854#comment-42849</guid>
		<description>I think the above(DISABLE ALL TRIGGERS ON THE TABLE) can also be deone with ALTER TABLE statement also.</description>
		<content:encoded><![CDATA[<p>I think the above(DISABLE ALL TRIGGERS ON THE TABLE) can also be deone with ALTER TABLE statement also.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Worth</title>
		<link>http://blog.sqlauthority.com/2008/08/19/sql-server-disable-all-the-trigger-of-current-database/#comment-41785</link>
		<dc:creator>Simon Worth</dc:creator>
		<pubDate>Tue, 19 Aug 2008 13:37:25 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=854#comment-41785</guid>
		<description>In the cursor, you may want to use the system view "sys.Triggers" to get a list of triggers in the context of the current database rather than the outdated SQL 2000 style of using sysobjects.  sysobjects is only for backward compatibility with 2000 and should be avoided on any new development.  At the very least - if you did not want to use sys.triggers then you should be using sys.objects on SQL 2005 and 2008.  
If development is on a 2000 instance then sysobjects is the way to go in order to get a list of triggers.

For 2005 and 2008 you could use
SELECT QUOTENAME(OBJECT_NAME(parent_id)) AS tbName from sys.triggers

But this does not take into account tables that exist within other schemas other than dbo.  You will just receive an error if you run that code on triggers within other schemas.</description>
		<content:encoded><![CDATA[<p>In the cursor, you may want to use the system view &#8220;sys.Triggers&#8221; to get a list of triggers in the context of the current database rather than the outdated SQL 2000 style of using sysobjects.  sysobjects is only for backward compatibility with 2000 and should be avoided on any new development.  At the very least - if you did not want to use sys.triggers then you should be using sys.objects on SQL 2005 and 2008.<br />
If development is on a 2000 instance then sysobjects is the way to go in order to get a list of triggers.</p>
<p>For 2005 and 2008 you could use<br />
SELECT QUOTENAME(OBJECT_NAME(parent_id)) AS tbName from sys.triggers</p>
<p>But this does not take into account tables that exist within other schemas other than dbo.  You will just receive an error if you run that code on triggers within other schemas.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
