Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

1) I want to attach a database from my development server to my production server.

The database ESpiceHerbs from my development server is located at:

C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA

2) When I log in using my production server credentials and right click on the Databases folder in Object Explorer and select Attach Databases and click Add, I cannot find it there! :(

3) I am really confused as to why it cannot be located although its pointing to the same folder.

Could it be because the development server is running on 32 bit and the production server is running on 64 bit?

share|improve this question

migrated from Jan 10 '12 at 10:56

This question came from our site for professional and enthusiast programmers.

So have you detached the .mdf from your dev server, and copied it to the production server??? In order to attach it, the .mdf file (and any additional .ndf and .ldf files that make up the database) must be on the production server's local disks (or a UNC path the server can get to) – marc_s Jan 10 '12 at 8:23

Might be a rights issue. Have a look at the security settings on the physical .mdf file and make sure the user you are using for SSMS has access to that .mdf file.

Most probably, as you are supplying credentials, you are logging on with your Windows user id, so make sure that you have read-write priviliges on the .mdf file.

To get to the security settings: Explore -> Locate your file -> Right click -> Properties -> Security Tab

Your user group or your user should be in that list.

share|improve this answer
@marc_s Marc_s You hit the jackpot. I knew it must be some silly mistake or something that went pass my mind. Do you mind explaining more about the UNC Path? The url i provided at step (2) is that of the production server which i dont have access to. But i know the person who does. Does it mean that everytime i want to update my database, i have to give him the file and ask him to replace the existing database.mdf with the updated database.mdf? Aren't there any more convenient methods to do this? – user1079650 Jan 10 '12 at 9:03
change the extension menu to *.* files.

enter image description here

share|improve this answer
I"m sorry but I'm afraid i dont quite comprehend that answer. Could you please be more specific? Thank you :) – user1079650 Jan 10 '12 at 8:15
@user1079650 see my edit - change the value so you can see all files. – Royi Namir Jan 10 '12 at 8:19
@ Royi Namir. I did. Still unable to locate the files. – user1079650 Jan 10 '12 at 8:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.