March 20, 2003 at 10:07 am
I am testing different types of restores.
I am trying to test restoring the master.
When I take sqlserver offline, rename either
the master mdf or master ldf file, I cannot get single user mode to startup with:
sqlservr.exe -c -m
Two questions:
1. Can I assume then if media failure affects
either the master's data or log, a master rebuild is necessary, a restore will not work?
2. I don't know what to put in for
"Source Directory Containing Data Files"
when attempting to rebuild the master?
3. I don't know what to put in for
Collation Setting either.
Any help would be appreciated.
Thanks
March 20, 2003 at 8:03 pm
1. Not positive, but it's the route I take, then restore after the rebuild if neccessary (objects in master to recover)
2. This is the directory the origional was in.
3. This is the collation the server was origionally installed with. (and of course, this was documented so that if you are not the one who did it to start with, or don't remember, you know which to use.)
Edited by - scorpion_66 on 03/20/2003 8:04:38 PM
March 21, 2003 at 3:24 am
I have devised and tested the following script which will rebuild master in SQL2K, I hope it helps.
REBUILD MASTER in SQL2000.
Here are the instructions required to rebuild MASTER if MASTER is missing or totally corrupt.
1. Copy the contents of ‘<cd-drive>\x86\Data’ to a directory on the server. Then clear the read-only property on each of the files.
2. Start a command session
3. Type net stop MSSQLServer
4. Type rebuildm
In ‘source directory containing data files’ type in the directory created in step 1.
‘Data directory’ should contain the original location of the MASTER database and should not need changing.
5. Type sqlservr –m
If this is not recognised then cd to ‘C:\Program Files\Microsoft SQL Server\MSSQL\Binn’ and type in the command again.
6. Run SQL Server Query Analyzer.
Use Master
Go
Restore database master from disk = ‘last backup location’
Go
7. Type net start MSSQLServer
8. Run SQL Server Query Analyzer – To restore any other databases that may have been lost.
Use Master
Go
Restore database model from disk = ‘last backup location’
Restore database msdb from disk = ‘last backup location’
And any other user database’s that may need restoring.
Go
9.Reboot server.
March 21, 2003 at 7:49 am
This is great! exactly what I was looking
for. Thanks
March 21, 2003 at 11:35 am
I followed instructions by copying the files to disk and removing read only.
But I keep getting:
REBUILD FAILED WITH ERROR -1;
So, I put the cd in and pointed the rebuild at the cd directory. It seems to go further
but still ends with
REBUILD FAILED WITH ERROR 1;
Any ideas.
March 21, 2003 at 7:55 pm
Files copied from CD will have the readonly bit set, might try clearing it.
Andy
March 24, 2003 at 6:53 am
Took off the readonly bit, still get the
error. Then tried pointing the destination to the cd with the cd in. It goes a little
further than running it from disk, but
still gives the -1 error.
March 24, 2003 at 8:26 am
Hello. Had the same problem. See Q273572 to resolve it.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply