Link to home
Start Free TrialLog in
Avatar of LuiLui77
LuiLui77

asked on

How to properly restore a SQL instance in a new server?

Hello,

I am currently backing up some databases in a SQL instance. Between the databases that I am backing up are the "model" and "master" default databases.

My question comes when recovering these databases including the model and master, how is it that I should recover them in a new SQL server?

Should I overwrite the "model" and "master" databases on this new SQL server?
ASKER CERTIFIED SOLUTION
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LuiLui77
LuiLui77

ASKER

Thank you Gentlemen for your posts!

Scott, when you refer to "user dbs", are you referring to a database named "user" or the master database that contains the logins? also, when you say "CREATE DATABASE ... WITH ATTACH" is that an option to recover?

Sorry for inexperience!
"User dbs" are all the non-system dbs.  System dbs are master, model, msdb and tempdb.  (If replication is being used, you might also have a db named "distribution", or even multiple distribution dbs with whatever names the person setting up replication chose).  

Yes, the "CREATE DATABASE ... WITH ATTACH" is one of way of taking existing db files, copying them to this new server, and then bringing that user db up in the new instance.  Other methods would be restore, which is perfectly accept, and sp_attach_db, which is obsolete and should not be used.
Thank you