SQL 2008 Database Move

Bransby-IT used Ask the Experts™
SQL 2008
Server 2003

I have built a new Microsoft Server 2008 R2 SP1ready to install SQL 2008.

First thing in the New Year I am going to do the following.

Migrate several of my SQL Database from one server to another.

This will end up having two SQL servers, the old one I will decommission in a few months.

What method do you experts recommend?

And any tips and tricks and best practice to installing SQL 2008 the way the Pro's do it?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
"Batchelor", Developer and EE Topic Advisor
Top Expert 2015
There are two common methods used:

detach - copy - attach: Detach the DB on old server, copy the data and log files to the new server, and attach them there, providing the new paths if changed. You can do both detach and attach with SSMS.

backup - (copy -) restory: Create a full DB backup, and restore it to the new server. This is best done via T-SQL.

You'll have to make sure you'll recreate the SQL Logins, if any, prior to any other operations, and to revalidate DB Users on the new server for each DB and user with
  exec sp_change_users_login 'Update_One', «dbuser1», «dbuser1»
(executed in each DB).


So both SA accounts have to have the same username and passwords?
The server names will have changed so I know I will have to let the clients know.

I was kind of swayed to detach the database.   The SQL install directory can change yes?
Is the old server the same version? If the old server is of an earlier version you have the choice to keep or change the compatibility level. There is also a advisor that can help with this kind of migration:


Do you have any SQL jobs setup on the old server? If yes you will need to move them as well.
Acronis in Gartner 2019 MQ for datacenter backup

It is an honor to be featured in Gartner 2019 Magic Quadrant for Datacenter Backup and Recovery Solutions. Gartner’s MQ sets a high standard and earning a place on their grid is a great affirmation that Acronis is delivering on our mission to protect all data, apps, and systems.

Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

You can change directories as you see fit, for each file individually.

Passwords are stored in the SQL Server's master DB, and can be different. User names need to be the same.
If you detach and attach the files you don't have to do anything with the location. Just move the files in the folder where you want to keep them on the new server. Database doesn't even has to exist on the new server.


Great stuff, well I have just got the server ready to install SQL 2008, after the install I need to apply any patches ect.   Which is my best option for this?


Thanks for your help team.   Back in the New Year!
Merry Christmas.......
Install the SQL server 2008 R2 and after finish just run s windows update and it will pick up any necessary patches and updates.


by: ZberteocPosted on 2012-12-21 at 14:47:05ID: 38713123
Rank: Sage
Do you have any SQL jobs setup on the old server? If yes you will need to move them as well.

When you say this what do you mean?   How can I tell?
If you expand the SQLAgent node > Jobs > Right Ckick on the job, if there are any > Properties and then in the windows that opens check the steps details and see if any of them are executed against the database you need to move. If yes then you will help to recreate the jobs on the other server. You can actually script them out.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial