Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

starting sql server service to allow master restore

Status
Not open for further replies.

Paulvtis

MIS
Aug 1, 2002
36
0
0
PH
How do I start the service in order to be able to restore master?

what is the syntax for starting that allows this master db restore. there is something to do with a -m but I can't seem to get the actual syntax

tnx
 
1. Stop MSSQLServer and SQLServerAgent services.
2. From a command prompt, enter this command:

sqlservr.exe -m

3. Run Enterprise Manager to restore the master database from the backup.

--from mssqlcity.com
 
doesn't seem to work. should i do this on a specific folder in the command prompt or anywhere let us say c:\ ?

my instance is bakserver\b1 how do i incorporate my instance in the syntax of sqlservr.exe -m?

tnx

 
You need to run sqlservr.exe from the installation folder of your instance. By default this will be:

C:\Program Files\Microsoft SQL Server\MSSQL$MyInstance\Binn

--James
 
c:\b4ins\mssql$b4\binn sqlservr.exe -m

this is what i did.

doesn't work

error:
initerrlog:could not open error log file ..... operating system error = 3 ..... cant find specified path

pls advise tnx
 
this is what you did:
c:\b4ins\mssql$b4\binn sqlservr.exe -m

and you should have this:
c:\b4ins\mssql$b4\binn\sqlservr.exe -m
 
actually what i did in the coomand prompt is i went to the binn folder then type sqlservr.exe -m

its correct right?

tnx
 
For the initerrlog i have found out the error.

everytime i run the error indicates:

could not open error log file 'c:\sqldata\mssql\log\errorlog'. operating system error = 3
cannot find path specified.

actually the folder sqldata is not existing already. i removed my instance and reinstalled again another instance and seems like the log always still points to this old location.

I find my actual log in C:\b5data\mssql$b5\log

my instance is b5

do i have to path to this folder? how?

tnx
 

by the way i have tried the restore, it worked for the same instance but if i backup master from an instance say 'ins1' then i install another instance named 'ins2' when i tried the script to restore in a single user mode it still point to the old path of 'ins1' and i cant start the server.

below is the script :

C:\b6ins\mssql$b6\binn>sqlservr.exe -d c:\b6data\mssql$b6\data\master.mdf -l c:\b6datamssql$b6\data\mastlog.ldf -e c:\b6data\mssql$b6\log\errorlog -m -s b6

again, this worked when restore to same instance but did not if to another instance

tnx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top