question

azeee avatar image
azeee asked

Attaching a SQL 2005 MDF file to SQL 2008 DB

Hi Guys, Can I attach an MDF file from a SQL Server 2005 database to a SQL Server 2008 R2 database? I am trying to do that but the MDF file is not visible when I browse to attach it. Thanks, Ahmed
sql-server-2005sql-server-2008-r2attach
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

WilliamD avatar image
WilliamD answered
It is possible to attach a SQL 2005 database to a SQL Server 2008 instance. It is *not* possible in the other direction. If you cannot see the MDF file in the file browser, you need to make sure that the file is really where you are looking, that you have the correct permissions on the folder, that the file has .mdf as the ending (the file browser has a filter on it by default). Another alternative is to write the attach command in t-sql instead of using SSMS, that way, you can write the location without having to browse there through the GUI.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

azeee avatar image azeee commented ·
Hi Guys, Thanks for your response. Grant, I was not trying to attach it to an existing 2008 database. William, the issue was with the permissions on the folder where the files were placed. After assigningthe appropriate permissions, I can attach the file now.
0 Likes 0 ·
Grant Fritchey avatar image
Grant Fritchey answered
But, you're not trying to attach a 2005 file to an existing 2008 database are you? That's probably an issue.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.