<?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>Edwin M SarmientoTrying to attach an MDF file to SQL Server 2005? &#8211; Edwin M Sarmiento</title>
	<atom:link href="https://www.edwinmsarmiento.com/trying-to-attach-an-mdf-file-to-sql-server-2005/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.edwinmsarmiento.com</link>
	<description>Intentional Excellence</description>
	<lastBuildDate>Mon, 13 Apr 2026 21:00:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">84283043</site>		<item>
		<title>Trying to attach an MDF file to SQL Server 2005?</title>
		<link>https://www.edwinmsarmiento.com/trying-to-attach-an-mdf-file-to-sql-server-2005/</link>
		<comments>https://www.edwinmsarmiento.com/trying-to-attach-an-mdf-file-to-sql-server-2005/#respond</comments>
		<pubDate>Fri, 27 Feb 2009 00:20:00 +0000</pubDate>
		<dc:creator>Edwin M Sarmiento</dc:creator>
				<category><![CDATA[attach database]]></category>
		<category><![CDATA[SQL Server 2005]]></category>
		<guid isPermaLink="false">http://bassplayerdoc.wordpress.com/2009/02/27/trying-to-attach-an-mdf-file-to-sql-server-2005</guid>

				<description><![CDATA[While this is not recommended especially when you&#8217;re a bit paranoid about disaster recovery and data integrity, I still find a lot of people doing it. I guess a lot of independent software vendors don&#8217;t understand the underlying concepts behind the database engine. While it may have worked in SQL Server 2000 using Enterprise Manager, [&#8230;]]]></description>
					<content:encoded><![CDATA[<p><span style="font-family:arial;">While this is not recommended especially when you&#8217;re a bit paranoid about disaster recovery and data integrity, I still find a lot of people doing it. I guess a lot of independent software vendors don&#8217;t understand the underlying concepts behind the database engine. While it may have worked in SQL Server 2000 using Enterprise Manager, trying to attach an MDF file in SQL Server 2005 Management Studio will fail. To work around this, you can use the <strong><span style="font-size:85%;"><a href="http://technet.microsoft.com/en-us/library/ms174385.aspx">sp_attach_single_file_db</a></span></strong> system stored procedure. This will attach the MDF file and create an LDF file as well. This will only work if your database only has one datafile. Using this if your database has multipe datafiles won&#8217;t work. You do have to run the <a href="http://msdn.microsoft.com/en-us/library/ms176064(SQL.90).aspx">DBCC CHECKDB </a>command to validate your database</span></p>
<p><span style="font-family:Arial;">I&#8217;d still prefer the backup/restore approach. Nothing beats having a peace of mind</span></p>
<div class="blogger-post-footer"><img decoding="async" src="" alt="" width="1" height="1" /></div>
]]></content:encoded>
			

		<wfw:commentRss>https://www.edwinmsarmiento.com/trying-to-attach-an-mdf-file-to-sql-server-2005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
				<post-id xmlns="com-wordpress:feed-additions:1">166</post-id>	</item>
	</channel>
</rss>