<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Move Database Files MDF and LDF to Another Location</title>
	<atom:link href="http://blog.sqlauthority.com/2012/10/28/sql-server-move-database-files-mdf-and-ldf-to-another-location/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2012/10/28/sql-server-move-database-files-mdf-and-ldf-to-another-location/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Fri, 17 May 2013 15:26:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: NT Mohare</title>
		<link>http://blog.sqlauthority.com/2012/10/28/sql-server-move-database-files-mdf-and-ldf-to-another-location/#comment-467584</link>
		<dc:creator><![CDATA[NT Mohare]]></dc:creator>
		<pubDate>Thu, 02 May 2013 06:15:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21454#comment-467584</guid>
		<description><![CDATA[is it work when database in replication mode]]></description>
		<content:encoded><![CDATA[<p>is it work when database in replication mode</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Donie</title>
		<link>http://blog.sqlauthority.com/2012/10/28/sql-server-move-database-files-mdf-and-ldf-to-another-location/#comment-452492</link>
		<dc:creator><![CDATA[Donie]]></dc:creator>
		<pubDate>Tue, 09 Apr 2013 12:26:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21454#comment-452492</guid>
		<description><![CDATA[Hi guys,

This is my situation. I have 68 servers, all local. Now i want these servers to be  hosted a single or 2 servers. how do I go about the procedure of transferring the data without making disruptions on the operation on the server.]]></description>
		<content:encoded><![CDATA[<p>Hi guys,</p>
<p>This is my situation. I have 68 servers, all local. Now i want these servers to be  hosted a single or 2 servers. how do I go about the procedure of transferring the data without making disruptions on the operation on the server.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Burgess</title>
		<link>http://blog.sqlauthority.com/2012/10/28/sql-server-move-database-files-mdf-and-ldf-to-another-location/#comment-420996</link>
		<dc:creator><![CDATA[Kevin Burgess]]></dc:creator>
		<pubDate>Tue, 12 Feb 2013 14:21:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21454#comment-420996</guid>
		<description><![CDATA[Moving a standard datafile is as easy as it is written here but a better article would have included how to move the master database to a new location.  Although it isn&#039;t done often it is well worth knowing simply because there are occasions where this might save you a lot of time, effort and downtime.]]></description>
		<content:encoded><![CDATA[<p>Moving a standard datafile is as easy as it is written here but a better article would have included how to move the master database to a new location.  Although it isn&#8217;t done often it is well worth knowing simply because there are occasions where this might save you a lot of time, effort and downtime.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2012/10/28/sql-server-move-database-files-mdf-and-ldf-to-another-location/#comment-377190</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Tue, 20 Nov 2012 06:35:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21454#comment-377190</guid>
		<description><![CDATA[You can directly specify UNC path

Backup database db_name to disk=&#039;\\system\path\dbname.bak&#039;]]></description>
		<content:encoded><![CDATA[<p>You can directly specify UNC path</p>
<p>Backup database db_name to disk=&#8217;\\system\path\dbname.bak&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kirti Ahuja</title>
		<link>http://blog.sqlauthority.com/2012/10/28/sql-server-move-database-files-mdf-and-ldf-to-another-location/#comment-374011</link>
		<dc:creator><![CDATA[Kirti Ahuja]]></dc:creator>
		<pubDate>Wed, 14 Nov 2012 13:38:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21454#comment-374011</guid>
		<description><![CDATA[What if i want to create a backup and then want to move it]]></description>
		<content:encoded><![CDATA[<p>What if i want to create a backup and then want to move it</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Changing Default Installation Path for SQL Server &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2012/10/28/sql-server-move-database-files-mdf-and-ldf-to-another-location/#comment-372398</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Changing Default Installation Path for SQL Server &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sun, 11 Nov 2012 03:00:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21454#comment-372398</guid>
		<description><![CDATA[[...] I wrote a blog post about SQL SERVER – Move Database Files MDF and LDF to Another Location and in the blog post we discussed how we can change the location of the MDF and LDF files after [...]]]></description>
		<content:encoded><![CDATA[<p>[...] I wrote a blog post about SQL SERVER – Move Database Files MDF and LDF to Another Location and in the blog post we discussed how we can change the location of the MDF and LDF files after [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos</title>
		<link>http://blog.sqlauthority.com/2012/10/28/sql-server-move-database-files-mdf-and-ldf-to-another-location/#comment-367209</link>
		<dc:creator><![CDATA[Carlos]]></dc:creator>
		<pubDate>Wed, 31 Oct 2012 22:11:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21454#comment-367209</guid>
		<description><![CDATA[Hi Pinal,

Excellent Blog Congrats.!!!

According to the topic, I prefer to use ALTER DATABASE to indicate new location of the database files. What do you think?


-- 0.- MAKE DATABASE BACKUP (IF POSSIBLE)

-- 1.-SET DATABASE OFFLINE
ALTER DATABASE [TestDB] SET OFFLINE WITH ROLLBACK IMMEDIATE 
GO
-- 2.- MOVE FILES TO NEW LOCATION
EXEC xp_cmdshell &#039;COPY &quot;C:\OriginalLocation\TestDB_log.ldf&quot; &quot;C:\NewLocation\TestDB_log.ldf&quot;&#039;
GO
EXEC xp_cmdshell &#039;COPY &quot;C:\OriginalLocation\TestDB.mdf&quot;     &quot;C:\NewLocation\TestDB.mdf&quot;&#039;
GO
-- 3.- ALTER DATABASE MODIFY FILE NAME
-- 3.- LOG
ALTER DATABASE [TestDB] MODIFY FILE ( NAME = &#039;TestDB_log&#039;, FILENAME = &#039;C:\NewLocation\TestDB_log.ldf&#039; ) 
GO
-- 3.- DATA
ALTER DATABASE [TestDB] MODIFY FILE ( NAME = &#039;TestDB&#039;,     FILENAME = &#039;C:\NewLocation\TestDB.mdf&#039; ) 
GO
-- 4.- SET DATABASE ONLINE
ALTER DATABASE [TestDB] SET ONLINE 
GO
--   OPTIONAL
-- 5.- CHECK INTEGRITY
DBCC CHECKDB(&#039;TestDB&#039;)
GO
-- 6.- DELETE THE OLD DATABASE FILES
EXEC xp_cmdshell &#039;DEL /Q &quot;C:\OriginalLocation\TestDB_log.ldf&quot;&#039;
GO
EXEC xp_cmdshell &#039;DEL /Q &quot;C:\OriginalLocation\TestDB.mdf&quot; &#039;]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>Excellent Blog Congrats.!!!</p>
<p>According to the topic, I prefer to use ALTER DATABASE to indicate new location of the database files. What do you think?</p>
<p>&#8211; 0.- MAKE DATABASE BACKUP (IF POSSIBLE)</p>
<p>&#8211; 1.-SET DATABASE OFFLINE<br />
ALTER DATABASE [TestDB] SET OFFLINE WITH ROLLBACK IMMEDIATE<br />
GO<br />
&#8211; 2.- MOVE FILES TO NEW LOCATION<br />
EXEC xp_cmdshell &#8216;COPY &#8220;C:\OriginalLocation\TestDB_log.ldf&#8221; &#8220;C:\NewLocation\TestDB_log.ldf&#8221;&#8216;<br />
GO<br />
EXEC xp_cmdshell &#8216;COPY &#8220;C:\OriginalLocation\TestDB.mdf&#8221;     &#8220;C:\NewLocation\TestDB.mdf&#8221;&#8216;<br />
GO<br />
&#8211; 3.- ALTER DATABASE MODIFY FILE NAME<br />
&#8211; 3.- LOG<br />
ALTER DATABASE [TestDB] MODIFY FILE ( NAME = &#8216;TestDB_log&#8217;, FILENAME = &#8216;C:\NewLocation\TestDB_log.ldf&#8217; )<br />
GO<br />
&#8211; 3.- DATA<br />
ALTER DATABASE [TestDB] MODIFY FILE ( NAME = &#8216;TestDB&#8217;,     FILENAME = &#8216;C:\NewLocation\TestDB.mdf&#8217; )<br />
GO<br />
&#8211; 4.- SET DATABASE ONLINE<br />
ALTER DATABASE [TestDB] SET ONLINE<br />
GO<br />
&#8211;   OPTIONAL<br />
&#8211; 5.- CHECK INTEGRITY<br />
DBCC CHECKDB(&#8216;TestDB&#8217;)<br />
GO<br />
&#8211; 6.- DELETE THE OLD DATABASE FILES<br />
EXEC xp_cmdshell &#8216;DEL /Q &#8220;C:\OriginalLocation\TestDB_log.ldf&#8221;&#8216;<br />
GO<br />
EXEC xp_cmdshell &#8216;DEL /Q &#8220;C:\OriginalLocation\TestDB.mdf&#8221; &#8216;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J</title>
		<link>http://blog.sqlauthority.com/2012/10/28/sql-server-move-database-files-mdf-and-ldf-to-another-location/#comment-366167</link>
		<dc:creator><![CDATA[J]]></dc:creator>
		<pubDate>Mon, 29 Oct 2012 13:56:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21454#comment-366167</guid>
		<description><![CDATA[it&#039;s better to copy files than to move them because if there are trouble with big files, you had to restore the database.]]></description>
		<content:encoded><![CDATA[<p>it&#8217;s better to copy files than to move them because if there are trouble with big files, you had to restore the database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: venkat</title>
		<link>http://blog.sqlauthority.com/2012/10/28/sql-server-move-database-files-mdf-and-ldf-to-another-location/#comment-365782</link>
		<dc:creator><![CDATA[venkat]]></dc:creator>
		<pubDate>Sun, 28 Oct 2012 16:46:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21454#comment-365782</guid>
		<description><![CDATA[it is possible to move tempdb in shard network location?]]></description>
		<content:encoded><![CDATA[<p>it is possible to move tempdb in shard network location?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://blog.sqlauthority.com/2012/10/28/sql-server-move-database-files-mdf-and-ldf-to-another-location/#comment-365716</link>
		<dc:creator><![CDATA[Daniel]]></dc:creator>
		<pubDate>Sun, 28 Oct 2012 12:02:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=21454#comment-365716</guid>
		<description><![CDATA[Hi, 

Is the procedure the same if I use database mirroring or replication?  If I&#039;m not wrong is not possible to detach db

Regards]]></description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>Is the procedure the same if I use database mirroring or replication?  If I&#8217;m not wrong is not possible to detach db</p>
<p>Regards</p>
]]></content:encoded>
	</item>
</channel>
</rss>
