Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
aex
Yak Posting Veteran
60 Posts |
Posted - 2007-03-27 : 10:40:49
|
Rarely I need to perform detach/attach stuff during my development. However, I have to develop an application that use sql server user instance (I am not sure I call it right) this recently. My problem is each time I detach .mdf file from one machine located at, say: D:\Data\Db.mdf. Once after I trasfer this file to other machine at: C:\Db.mdf, then I try to attach this .mdf file. What cause the problem here is sql server doesn'tallow me to attach the file unless I have the .mdf file corresponding .ldf file.My thought is that sql server should allow me to attach the file and create a .ldf file if it doesn't find one. Any idea why this happen?Thanks for any reply.aex |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-03-27 : 10:57:23
|
Try using sp_attach_single_file_db.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
aex
Yak Posting Veteran
60 Posts |
Posted - 2007-03-27 : 11:09:04
|
Thanks harsh for the stored procedures. I will try it out tomorrow to see whether it works. Thanks. :)aex |
|
|
|
|
|