MDF file not showing up under "locate database files"

  • Hi All,

    I copied an mdf and ldf file from a remote server to my local. When I go to attach that database from management studio, the file is not showing up. The directory is showing up. What could be the issue.

    Thanks.

  • The actual question did you put both files in the Data sub folder of Microsoft SQL Server folder in programs because that is where you need to add it before you can attach it.

    Kind regards,
    Gift Peddie

  • Run this:

    EXECUTE master.dbo.xp_dirtree 'D:\Temp', 1, 1

    Replace D:\Temp with the folder you copied your database files to. Do they come up?

  • Yes i copied both mdf and ldf. After running the command on master, it is still not showing up.

  • If you put it in that folder and verified it you should be able to navigate to it in the drop down. If you still cannot find it and you are in Express then you it is a User Instance. If it is a User Instance attaching it is different. Actually User Instance does not come with LDF so ignore the last part.

    Kind regards,
    Gift Peddie

  • I had to rename that file and after that it showed up. Strange!!! Thanks for your time.

  • I am glad to see you have resolved your problem.

    Kind regards,
    Gift Peddie

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply