all groups > sql server msde > april 2006 >
You're in the

sql server msde

group:

restoring master db on MSDE2000


restoring master db on MSDE2000 Sagaert Johan
4/9/2006 6:42:50 PM
sql server msde:
Hi

I have a backup copy of the master db, but how to retore it ?

Should i recreate all user and login info with by entering the t-sql
commands to add and grant users, or can i resore my backup of the master
database in some way ?

(i already tried single user mode to restore the master db ,but without
sucses )

Any hints ?




Re: restoring master db on MSDE2000 Andrea Montanari
4/10/2006 4:53:23 PM
hi Johan,
[quoted text, click to view]

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_4g4w.asp

open a command prompt window..
c:\>cd program files\..... instance name\Binn
c:\>sqlservr.exe -c -m -sInstanceName

SQL Server will be started in "application" (not as a service) an "single
user" mode...

open another command prompt window..
c:\...\>osql.exe -Usa -P<pwd> -S(Local)\InstanceName

a successfull login will be prompted with oSql prompt like
1>USE master;
2>RESTORE DATABASE master FROM DISK = 'c:\msdeMster.bak' WITH FILE = 1;
3>GO

if everithing is ok, you'll be prompted with
"The master database has been succesfully restored. Shutting down SQL
Server.
SQL Server is terminating this process."

and you'll be shut down from oSql.exe command line tool too..
you can close both command windows...

at this moment, you'll have a situation of your logins exactely the same at
the time you backed up your master database... so you do not have to
re-create logins if they were already present at backup time..

you can check that re-entering oSql.exe (after having restarted your MSDE
instance as usual) and executing
1>EXEC sp_helplogins;
2>GO

all your logins will be enlisted as long as their database access
permissions and database roles membership..
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtm http://italy.mvps.org
DbaMgr2k ver 0.18.0 - DbaMgr ver 0.62.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--------- remove DMO to reply

AddThis Social Bookmark Button