I detached one sql 2012 DB and moved the file table folder and mdf and ldf files to another drive in the same machine. Now I need to attach the files
but got error
Please help
What I have tried:
I did the below steps
1. database -> right click ->attach
2.Clicked add button and selected the mdf file
3.clicked ok
It shows the below error
TITLE: Microsoft SQL Server Management Studio
------------------------------
Attach database failed for Server 'SQL7\MSSQLSERVER2012'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.2218.0+((SQL11_RTM_GDR).120612-1251+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Unable to open the physical file "D:\data\DB\MyFileTable". Operating system error 2: "2(The system cannot find the file specified.)".
A file activation error occurred. The physical file name 'D:\data\DB\MyFileTable' may be incorrect. Diagnose and correct additional errors, and retry the operation.
Could not open new database 'MYDB'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 5120)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.2218&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
D:\data\DB\MyFileTable
was my previous path of the DB files. I now moved them to E drive.
This DB contains MDF , LDF files in the same path and along with that I have one folder to keep file table too in the same path. But previously the path was in D and the error message shows that it is still checking D drive for the file table.I moved the file table folder to D drive and MDF and LDF in E Drive itself and tried.Then it worked fine. But i need to move the file table also to E drive before attaching.