i have cut and pasted the mdf and ldf files of my database from SQL server DATA folder to network drive so how can i attached database from there ...
i am trying this code:
Create database [TestDB] on
(FILENAME = N'\\123.123.1.123\EDMS\DB\TestDB.mdf' ),
(FILENAME = N'\\123.123.1.123\EDMS\DB\TestDB_log.ldf' )
for attach
go
this ip address is just for example..
but above code is giving error
Directory lookup for the file "\\123.123.1.123\EDMS\DB\TestDB.mdf" failed with the operating system error 67(The network name cannot be found.).
Replyy soon
Thanks.
Dhirendra MisraPosted Jan 8, 2014, 5:37 AM
I don't think you need to install SQL Server at mapping drive.
For can do a quick test. If SQL Server is installed at C: , create test database and copy the .mdf and .ldf at D: drive and re-attach it.
Refer the link for reference:
http://blog.sqlauthority.com/2012/10/28/sql-server-move-database-files-mdf-and-ldf-to-another-location/
Faisal AnsariPosted Jan 8, 2014, 4:50 AM
Reply sooon
Thanks
Dhirendra MisraPosted Jan 8, 2014, 1:28 AM
I would suggest. Please check, can you can access the network path with account which is being used by SQL Server.
Refer:
http://support.microsoft.com/kb/843156
http://www.error.info/windows/network-67.html
Thanks