Groups | Blog | Home
all groups > sql server (alternate) > september 2003 >

sql server (alternate) : Recovery from crash


Guinness Mann
9/12/2003 8:47:35 AM
Greetings,

I had a hard-drive failure this week and lost my root drive, with
operating system and SQL Server 2000.

Fortunately my data was on another volume and still exists.

I know about sp_attach_db, but looking at BOL, it says that sp_attach_db
only works with databases that were previously detached with
sp_detach_db.

How do I reattach my existing mdf and ldf files?

-- Rick

P.S. I know that the dbs are not corrupt because when the hard drive
Erland Sommarskog
9/12/2003 10:06:45 PM
Guinness Mann (GMann@dublin.com) writes:
[quoted text, click to view]

I would first try with sp_attach_db. If SQL Server was shut down cleanly,
I would expect the database files to be available.

If that fails, I would try sp_attach_single_file_db.

If that fails, there is an undocumented and unsupported method, that
I am not telling about in a newsgroup, because that methods is just
simply far too dangerous. I have no problem sharing it by mail. But
please try sp_detach_db first.


--
Erland Sommarskog, SQL Server MVP, sommar@algonet.se

Books Online for SQL Server SP3 at
Guinness Mann
9/15/2003 9:17:22 AM
In article <Xns93F5E2EFD74Yazorman@127.0.0.1>, sommar@algonet.se says...
[quoted text, click to view]

sp_attach_db worked great, Erland. Thank you.

-- Rick
AddThis Social Bookmark Button