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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Server crash

Author  Topic 

SQLCode
Posting Yak Master

143 Posts

Posted - 2005-11-02 : 12:16:01
Please help!
Our server crashed but we have all mdfs and ldf safe on a drive that we copied.
we rebuilt the server but unfortunately could not not place the files on the same drive that they were originally placed. Can we not attach db? does it have to be the drive? should we rename the drive if that can cause problem?

I guess what is the best method?
what should we restore first and how?

TIA

mcrowley
Aged Yak Warrior

771 Posts

Posted - 2005-11-02 : 12:17:26
You should be able to use sp_attach_db. I would be a bit sceptical about the consistency of the databases, though. You are probably going to have to restore from backup.
Go to Top of Page

SQLCode
Posting Yak Master

143 Posts

Posted - 2005-11-02 : 12:23:31
does that mean we should first restore master db?
We tried a few methods of masterdb like we renamed the new ldf and mdf and put the old mdf and ldf in place but it service would not start.
Go to Top of Page

mcrowley
Aged Yak Warrior

771 Posts

Posted - 2005-11-02 : 13:28:32
The master database can not be attached/detached for what should be obvious reasons.

After you put the old master.mdf and mastlog.ldf files in place of the new ones, you will likely have to start the SQL Service with the -f flag. Otherwise, SQL Server will notice that the datafiles are not all where they should be, and will refuse to start.

Are you certain you have the new server at the same service pack level as the old server?

Are all of the paths the same?

What does the SQL errorlog say about the failed startup attempts?
Go to Top of Page

SQLCode
Posting Yak Master

143 Posts

Posted - 2005-11-02 : 13:41:57
We did not start it with -f flag.
We just renamed the old ones and put the new ones at the same place. Does it not automatically get the new ones? they are at the same place, just replaced them with the new ones.
Thats what we were confirming. I think it is same as before.

It is SQL 2000 sp3.

Should we not restore master first? we can leave the master that comes with installation and attach other dbs first if that is a better way to go.
Also will also try it with -f flag.
Thanks a zillion for all your time and suggestions.
Go to Top of Page

SQLServerDBA_Dan
Aged Yak Warrior

752 Posts

Posted - 2005-11-02 : 14:07:21
quote:
Originally posted by SQLCode

Should we not restore master first? we can leave the master that comes with installation and attach other dbs first if that is a better way to go.
Also will also try it with -f flag.
Thanks a zillion for all your time and suggestions.



To restore the master database you need to use rebuildm.

Here's what I'd do:
1) use rebuildm to restore masterdb.
2 opt1) use all backups (hopefully you have them) to restore each db using the with replace option. You want to use the with replace option because your drive paths are not the same. If they are then you dont need to.
2 opt2) if no backups then try to place the files in the same path if the path is not there then you will probably need detach all the suspect databases and then attach them from the files.

Please note that once you use rebuildm the server will look for MSDB and model in the path were the other server had them. If the paths are not the same then you will need to restore those too.

Recovering from a crash is not something I've done 100,000 times or even 100 times for that matter, so I hope that there is someone on here that can help better than I can cause I'm not an expert at recovery.


Daniel, MCP, A+
SQL Server DBA
www.dallasteam.com
Go to Top of Page
   

- Advertisement -