<?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>TempDB optimization &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/tempdb-optimization/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>Wed, 26 Apr 2017 19:22:46 +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: How to move TempDB from one drive to another drive</title>
		<link>https://www.dbrnd.com/2017/04/sql-server-how-to-move-tempdb-from-one-drive-to-another-drive/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 26 Apr 2017 16:16:39 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></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[TempDB]]></category>
		<category><![CDATA[TempDB optimization]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=5071</guid>

					<description><![CDATA[In this post, I am sharing necessary steps to move SQL Server TempDB from one location to another location. When you are searching for TempDB optimization tips, you can find one tip like to change the location of TempDB because it should not be with SQL Server data file and the main reason is unpredictable [&#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%2F2017%2F04%2Fsql-server-how-to-move-tempdb-from-one-drive-to-another-drive%2F&amp;linkname=SQL%20Server%3A%20How%20to%20move%20TempDB%20from%20one%20drive%20to%20another%20drive" 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%2F2017%2F04%2Fsql-server-how-to-move-tempdb-from-one-drive-to-another-drive%2F&amp;linkname=SQL%20Server%3A%20How%20to%20move%20TempDB%20from%20one%20drive%20to%20another%20drive" 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%2F2017%2F04%2Fsql-server-how-to-move-tempdb-from-one-drive-to-another-drive%2F&amp;linkname=SQL%20Server%3A%20How%20to%20move%20TempDB%20from%20one%20drive%20to%20another%20drive" 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%2F2017%2F04%2Fsql-server-how-to-move-tempdb-from-one-drive-to-another-drive%2F&amp;linkname=SQL%20Server%3A%20How%20to%20move%20TempDB%20from%20one%20drive%20to%20another%20drive" 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%2F2017%2F04%2Fsql-server-how-to-move-tempdb-from-one-drive-to-another-drive%2F&amp;linkname=SQL%20Server%3A%20How%20to%20move%20TempDB%20from%20one%20drive%20to%20another%20drive" 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%2F2017%2F04%2Fsql-server-how-to-move-tempdb-from-one-drive-to-another-drive%2F&amp;linkname=SQL%20Server%3A%20How%20to%20move%20TempDB%20from%20one%20drive%20to%20another%20drive" 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%2F2017%2F04%2Fsql-server-how-to-move-tempdb-from-one-drive-to-another-drive%2F&#038;title=SQL%20Server%3A%20How%20to%20move%20TempDB%20from%20one%20drive%20to%20another%20drive" data-a2a-url="https://www.dbrnd.com/2017/04/sql-server-how-to-move-tempdb-from-one-drive-to-another-drive/" data-a2a-title="SQL Server: How to move TempDB from one drive to another drive"></a></p><p>In this post, I am sharing necessary steps to move SQL Server TempDB from one location to another location.<br />
When you are searching for TempDB optimization tips, you can find one tip like to change the location of TempDB because it should not be with SQL Server data file and the main reason is unpredictable size and maintenance of it. </p>
<p>I would suggest following steps to move your TempDB from one drive to another drive:</p>
<p><strong>Identify the location of TempDB:</strong></p>
<pre class="crayon-plain-tag">SELECT 
	name
	,physical_name AS Location
FROM sys.master_files
WHERE database_id = DB_ID(N'tempdb')
GO</pre> </p>
<p><strong>Change the location of TempDB, using ALTER DATABASE:</strong></p>
<pre class="crayon-plain-tag">ALTER DATABASE tempdb 
MODIFY FILE (NAME = tempdev, FILENAME = 'D:\YourDrive\tempdb.mdf');
GO

ALTER DATABASE tempdb 
MODIFY FILE (NAME = templog, FILENAME = 'D:\YourDrive\templog.ldf');
GO</pre> </p>
<p><strong>Once you execute above ALTERs, you will get below messages:</strong></p>
<pre class="crayon-plain-tag">The file "tempdev" has been modified in the system catalog. The new path will be used the next time the database is started.
The file "templog" has been modified in the system catalog. The new path will be used the next time the database is started.</pre> </p>
<p><strong>Next, Restart the Service of SQL Server.</strong></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
