Showing posts with label msdb. Show all posts
Showing posts with label msdb. Show all posts

Wednesday, March 28, 2012

restore databases 7.0

I have taken backups of 3 datbases

as

man1.dbf

msdb,model databases on drive d: but not taken master datbases then i had to format the c: on which sql server installed.

can i take full restore in this case or i have to create datbases and then sp_attach and sp_detach databases pls help me.

Some more details would be helpful:

1) what version of SQL Server is involved? Is it 7.0 or other?

2) What command was used to produce the backup files?

That will help us figure out the best course.

|||

how have u taken the backup. Is it using Backup Database command or using SP_Detach_db to detach the db and then backup the mdf and ldf files. If you have used detach method you can use sp_attach_db to attach the database. If you have used Backup database command then you need to use Restore database command probably with MOVE Option.

Madhu

Friday, March 9, 2012

Restore All System Databases

Hi All,

I need to do a restore of all my system databases, master, msdb and model, and of course my production database.

The Windows 2003 OS and Sql Server 2005 have both been reinstalled on the server.

I understand I need to be in Single User Mode to restore the master database and I just wanted to clarify the procedure for a successful restore.

I've found this page: http://msdn2.microsoft.com/en-us/library/ms190679.aspx which has instructions for restoring a master database.

So, all I have to do is:

1. Be in single user mode

2. Using SQLCMD run:
C:\> sqlcmd
1> RESTORE DATABASE master FROM DISK = 'Z:\MyBackLocation\master.bak';
2> GO

From the instructions:
"After master is restored, the instance of SQL Server shuts down and terminates the sqlcmd process"

My Questions:
When I've restored the master do I repeat the steps above to restore the msdb and model databases?

Are there any other pitfalls?

Thanks for any advice

Melt

See SQL Server 2005 Books Online topic:

Restoring the model and msdb Databases