Faisal Ansari

Faisal Ansari

  • NA
  • 451
  • 820k

How to attach database(.mdf) file from network drive sql2008

Jan 8 2014 12:14 AM
hello guys how r u ?

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.

Answers (3)