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 |
|
themightykumquat
Starting Member
1 Post |
Posted - 2004-11-08 : 18:30:51
|
| Hi, all. A friend who's new to databases took a copy of a DB by simply burning its mdf and ldf files to a CD. He then reinstalled Win XP and SQL Server onto the hard disk - the original database doesn't exist as he's reformatted the hard drive it sat on. He now can't reattach the files to his new instance of SQL Server. This is because he didn't run sp_detach on the database before he burned the files. Is there any way to reattach those files to his new SQL Server instance now that he's lost the original and he didn't detach it properly before burning it to CD? |
|
|
pyeoh
Starting Member
18 Posts |
Posted - 2004-11-08 : 20:01:02
|
| Unsupported, but you can try the suggestion here ([url]http://tinyurl.com/6apkt[/url]).Peter Yeohhttp://www.yohz.comNeed smaller SQL2K backups? Use MiniSQLBackup Lite, free! |
 |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2004-11-08 : 20:05:13
|
| since the files were burned to CD, the read-only bit is going to be set on them. Try unsetting this (properties on the file) and re-attaching with sp_attachdb. You might also need to try using the method linked by pyeoh. If that doesn't work you are basically SOL.btw, did he copy the files to CD while the database was online, or was the Database shutdown at the time? IF it was shutdown, then the regular sp_attachdb should work just fine. -ec |
 |
|
|
|
|
|