Take the 2-minute tour ×
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. It's 100% free, no registration required.

On attaching the database I get following error,

Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\demorainbow.mdf" failed with the operating system error 3 (The system cannot find the path specified.). (Microsoft SQL Server, Error: 5133)

How to solve this problem? Please help

share

migration rejected from stackoverflow.com Mar 14 at 5:26

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by Jon Seigel, Paul White, RolandoMySQLDBA, Michael - sqlbot, Mark Storey-Smith Mar 14 at 5:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Jon Seigel, Paul White, RolandoMySQLDBA, Michael - sqlbot, Mark Storey-Smith
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Which part of file not found do you not understand? The file you're looking for to attach isn't there ... Are you trying to attach to a remote SQL Server instance, and the .mdf file is on your local `C:` drive? That won't work! The file must be on the server machine - not your local PC .... –  marc_s Mar 13 at 14:53

1 Answer 1

The C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\demorainbow.mdf cannot be located !
Go to that path and make sure you have the mdf file there.

share