<?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>My Scripts and Tips &#187; SQL Server</title>
	<atom:link href="http://www.tipsandscripts.net/archives/category/sql-server/feed" rel="self" type="application/rss+xml" />
	<link>http://www.tipsandscripts.net</link>
	<description>Various things I've found useful in my travels</description>
	<lastBuildDate>Mon, 09 Aug 2010 09:23:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Moving MS SQL Server 2000 to new hardware</title>
		<link>http://www.tipsandscripts.net/archives/46</link>
		<comments>http://www.tipsandscripts.net/archives/46#comments</comments>
		<pubDate>Tue, 28 Apr 2009 10:24:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.tipsandscripts.net/?p=46</guid>
		<description><![CDATA[Moving MS SQL Server 2000 to new hardware without having to remount each database.]]></description>
			<content:encoded><![CDATA[<p>We had the fibre channel cards on our SQL Server fail on us. We had been planning to replace this server, and the storage array it was attached to, so we decided to bring that forward rather than repairing the server. Note we also had a copy of the server running in an isolated virtual machine for testing. All of our databases, including master.mdf were on a LUN on the storage array (previously mounted as D:).</p>
<p>Here are the steps we took in migrating our server:</p>
<ol>
<li>Installed Windows and drivers on the new server.</li>
<li>Modified the zones and mounted the LUN containing the SQL databases on the existing storage array to the new server (E:).</li>
<li>Created the required LUN on the new storage array and mounted on the new server (D:).</li>
<li>Used robocopy E:\ D:\ /MIR /R:0 /W:1 to copy the databases from the old LUN to the new LUN.</li>
<li>Unmounted the old LUN and undid the zone changes.</li>
<li>Moved everything on D: to a temporary directory on D: (so they wouldn&#8217;t get overwritten during the install of SQL Server 2000). Note, move the files to the same filesystem so everything happens instantly (i.e. not a copy).</li>
<li>On the old server, exported HKLM\Software\Microsoft\MSSQL from the registry.</li>
<li>Copied the SID from the old server to the new server using <a title="newsid.exe" href="http://technet.microsoft.com/en-us/sysinternals/bb897418.aspx" target="_blank">newsid.exe</a> (I had a friend run into a problem when restoring databases to a new server during a DR test. Because the SID of the new server was different to the old server security in the database didn&#8217;t work correctly. I assume this was because they were using local Windows accounts. ) I don&#8217;t know if we needed to do this step, but we did it just in case.</li>
<li>Removed the old server from the domain and renamed it. Changed its IP address.</li>
<li>Renamed the new server to the original name of the old server and added it to the domain. Set its IP address to the one previously used on the old server.</li>
<li>Installed SQL Server 2000. During the installation we specified the same paths as had been used on the old server (D:\Databases).</li>
<li>Installed SQL Server 2000 service packs.</li>
<li>Shut down the SQL services.</li>
<li>On the new server, exported HKLM\Software\Microsoft\MSSQL from the registry (just in case things went wrong).</li>
<li>On the new server, imported HKLM\Software\Microsoft\MSSQL that had been exported from the old server.</li>
<li>Renamed the directory containing the new master.mdf (D:\Databases to D:\Databases.freshinstall).</li>
<li>Moved the directories in the temporary directory back to their original location in D:.</li>
<li>Restarted the SQL services.</li>
</ol>
<p>Everything still seems to be working so I guess it worked. Luckily we weren&#8217;t using local accounts (only domain accounts) so we didn&#8217;t have to try to recreate the original accounts (which might have caused an issue with different account SIDs).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tipsandscripts.net/archives/46/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
