May 17, 2010 at 3:50 pm
In a test environment that originally had SQL Server 2000 installed using a MSDN disk we have had a major disaster.
We have backups of the master database and the msdb database.
Trying to use the rebuild master utility rebuildm.exe to rebuild the master database and then restore the backups.
The 'C:\Program Files\Microsoft SQL Server\MSSQL\Data' was empty of any files.
Long ago after the databases were all created the mdf and ldf files had been moved with alter database ... modify file statements; regedit still shows the master.mdf and mastlog.ldf in MSSQL\Data
Thinking the utility was just looking for any version of the system table files I copied some from another SQL Server 2000 server into the directory that was empty, the utility still says that it cannot find source files
Not sure what source files the rebuild utility is looking for and can't find.
Can anyone tell me?
Thank you in advance for any help.
May 17, 2010 at 4:05 pm
Just about as soon as I posted my question I found my answer.
the files were under the X86\DATA directory on the disk
and the main problem was that the files were marked read only in the subdir of MSSQL\Data
after unmarking read only the utility could find them
sorry for the bother
~Ellen
May 17, 2010 at 4:06 pm
its been a while but IIRC rebuildm is looking for the files from the install disk, that is the system db files in folder x86\data.
There was a bug with this, so copy these files to a local drive, REMOVE THE READ ONLY FLAG and point rebuildm to this location when it asks for source location.
rebuildm will know where to restore the files to and will bring server up to your SP level. then you can restore your system databases.
Once this is done, do yourself a favour, for future protection, stop SQL and copy the system db files off to another directory, then if you lose your system dbs again you can just slide these files back into place.
---------------------------------------------------------------------
May 17, 2010 at 4:09 pm
no bother, glad to hear you sorted it.
I still recommend doing a flat file copy of your system dbs, save having to worry about rebuildm.
edit: typo
---------------------------------------------------------------------
May 17, 2010 at 4:18 pm
Thank you. Great idea. When this mess is cleaned up I will copy the system files for safe keeping.
May 17, 2010 at 4:21 pm
just to note, re-copy whenever you upgrade. I usually have two copies on the go, current and previous versions.
---------------------------------------------------------------------
May 17, 2010 at 4:43 pm
you seem to be available just now ... so let me ask you something else, just call me stupid. I saw where several other people received the -1 error message after the rebuild but were able to restore from the backup and were fine.
But when I try to start the server I get the message below:
C:\Program Files\Microsoft SQL Server\MSSQL\Binn>sqlservr.exe -c -f -m
2010-05-17 18:40:16.09 server initerrlog: Could not open error log file 'd:\MSSQL\log\ERRORLOG'. Operating system error = 3(The system cannot find the path specified.).
any ideas for me?
all help is much appreciated
May 18, 2010 at 4:01 am
the -1 message from the rebuild means it failed as files are read only, so are system db files in place now? Are you sure it worked. Normal workaround is to copy the X86 directory off the disk, then remove read only flag.
Does that errorlog directory structure exist? If not create it. You can always move the errorlog location to where you want it afterwards
---------------------------------------------------------------------
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply