<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>sp_MSforeachdb &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/sp_msforeachdb/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Tue, 06 Feb 2018 20:06:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>SQL Server: Script to Drop a Table from all Databases</title>
		<link>https://www.dbrnd.com/2018/02/sql-server-script-to-drop-a-table-from-all-databases/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Fri, 23 Feb 2018 16:16:47 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server DBA Script]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[drop table]]></category>
		<category><![CDATA[sp_MSforeachdb]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7135</guid>

					<description><![CDATA[In this post, I am sharing a script for dropping a table from all databases of SQL Server. We are creating different versions of the database in our environment. Recently, I found some test/temp tables which are replicated in all versions databases. In this case, you can use below script and drop those tables from [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F02%2Fsql-server-script-to-drop-a-table-from-all-databases%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20Drop%20a%20Table%20from%20all%20Databases" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F02%2Fsql-server-script-to-drop-a-table-from-all-databases%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20Drop%20a%20Table%20from%20all%20Databases" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F02%2Fsql-server-script-to-drop-a-table-from-all-databases%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20Drop%20a%20Table%20from%20all%20Databases" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F02%2Fsql-server-script-to-drop-a-table-from-all-databases%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20Drop%20a%20Table%20from%20all%20Databases" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F02%2Fsql-server-script-to-drop-a-table-from-all-databases%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20Drop%20a%20Table%20from%20all%20Databases" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F02%2Fsql-server-script-to-drop-a-table-from-all-databases%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20Drop%20a%20Table%20from%20all%20Databases" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F02%2Fsql-server-script-to-drop-a-table-from-all-databases%2F&#038;title=SQL%20Server%3A%20Script%20to%20Drop%20a%20Table%20from%20all%20Databases" data-a2a-url="https://www.dbrnd.com/2018/02/sql-server-script-to-drop-a-table-from-all-databases/" data-a2a-title="SQL Server: Script to Drop a Table from all Databases"></a></p><p>In this post, I am sharing a script for dropping a table from all databases of SQL Server. </p>
<p>We are creating different versions of the database in our environment. Recently, I found some test/temp tables which are replicated in all versions databases. </p>
<p>In this case, you can use below script and drop those tables from all the databases. As per your requirement, you can add more option in a dynamic query. </p>
<p><strong>Use sp_MSforeachdb, and execute a command in all databases:</strong></p>
<pre class="crayon-plain-tag">exec sp_MSforeachdb
'use [?]
drop table table_name'</pre> </p>
<blockquote class="wp-embedded-content" data-secret="mPSCVlcu7Q"><p><a href="https://www.dbrnd.com/2016/12/sql-server-who-dropped-a-table-and-which-table-has-been-dropped/">SQL Server: Who dropped a Table and Which Table has been dropped</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/12/sql-server-who-dropped-a-table-and-which-table-has-been-dropped/embed/#?secret=mPSCVlcu7Q" data-secret="mPSCVlcu7Q" width="600" height="338" title="&#8220;SQL Server: Who dropped a Table and Which Table has been dropped&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<blockquote class="wp-embedded-content" data-secret="u0VWljOJ2q"><p><a href="https://www.dbrnd.com/2017/05/sql-server-who-dropped-a-table-find-out-from-transaction-log-fn_dblog/">SQL Server: Who dropped a table, find out from Transaction Log</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2017/05/sql-server-who-dropped-a-table-find-out-from-transaction-log-fn_dblog/embed/#?secret=u0VWljOJ2q" data-secret="u0VWljOJ2q" width="600" height="338" title="&#8220;SQL Server: Who dropped a table, find out from Transaction Log&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server: Script to check all Database Autogrowth Settings</title>
		<link>https://www.dbrnd.com/2016/01/sql-server-script-to-check-all-database-autogrowth-settings/</link>
					<comments>https://www.dbrnd.com/2016/01/sql-server-script-to-check-all-database-autogrowth-settings/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Fri, 15 Jan 2016 07:59:05 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server DBA Script]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[auto growth]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[sp_MSforeachdb]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=1302</guid>

					<description><![CDATA[In this post, I am sharing a script to find the all database auto-growth settings in the SQL Server. As a Database Administrator, many times I need to find auto-growth settings and size of all databases in SQL Server. This is very important for me because, for different reporting databases, I didn&#8217;t set limit for [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fsql-server-script-to-check-all-database-autogrowth-settings%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20check%20all%20Database%20Autogrowth%20Settings" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fsql-server-script-to-check-all-database-autogrowth-settings%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20check%20all%20Database%20Autogrowth%20Settings" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fsql-server-script-to-check-all-database-autogrowth-settings%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20check%20all%20Database%20Autogrowth%20Settings" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fsql-server-script-to-check-all-database-autogrowth-settings%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20check%20all%20Database%20Autogrowth%20Settings" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fsql-server-script-to-check-all-database-autogrowth-settings%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20check%20all%20Database%20Autogrowth%20Settings" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fsql-server-script-to-check-all-database-autogrowth-settings%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20check%20all%20Database%20Autogrowth%20Settings" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fsql-server-script-to-check-all-database-autogrowth-settings%2F&#038;title=SQL%20Server%3A%20Script%20to%20check%20all%20Database%20Autogrowth%20Settings" data-a2a-url="https://www.dbrnd.com/2016/01/sql-server-script-to-check-all-database-autogrowth-settings/" data-a2a-title="SQL Server: Script to check all Database Autogrowth Settings"></a></p><p>In this post, I am sharing a script to find the all database auto-growth settings in the SQL Server.</p>
<blockquote><p>As a Database Administrator, many times I need to find auto-growth settings and size of all databases in SQL Server.</p>
<p>This is very important for me because, for different reporting databases, I didn&#8217;t set limit for size.</p></blockquote>
<p>You can find all databases auto-growth by using sp_Msforeachdb.</p>
<pre class="crayon-plain-tag">SET STATISTICS TIME ON
exec sp_MSforeachdb 'use [?]; EXEC sp_helpfile'</pre>
<p><a href="https://www.dbrnd.com/wp-content/uploads/2016/01/DatabaseAutoGrowth.png" rel="attachment wp-att-1306"><img fetchpriority="high" decoding="async" class="alignnone wp-image-1306 size-full" title="SQL Server Database Auto Growth" src="https://www.dbrnd.com/wp-content/uploads/2016/01/DatabaseAutoGrowth.png" alt="SQL Server Database Auto Growth" width="912" height="516" srcset="https://www.dbrnd.com/wp-content/uploads/2016/01/DatabaseAutoGrowth.png 912w, https://www.dbrnd.com/wp-content/uploads/2016/01/DatabaseAutoGrowth-300x170.png 300w, https://www.dbrnd.com/wp-content/uploads/2016/01/DatabaseAutoGrowth-768x435.png 768w, https://www.dbrnd.com/wp-content/uploads/2016/01/DatabaseAutoGrowth-750x424.png 750w, https://www.dbrnd.com/wp-content/uploads/2016/01/DatabaseAutoGrowth-150x85.png 150w" sizes="(max-width: 912px) 100vw, 912px" /></a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2016/01/sql-server-script-to-check-all-database-autogrowth-settings/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
