Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I need to migrate an instance of SQL Server 2008 R2 (20+ databases) to a new server this weekend. The new server is exactly the same as the old server in all respects, including SQL Server version numbers. The only difference is that the new server has a lot more CPU power, RAM and harddrive space.

I've already successfully performed a test migration using my automated backups, but I only restored the user databases. This meant that I had to do a lot of work afterwords to recreate logins, jobs, maintenance plans, settings etc. I have all of this scripted and backed up, but its a lot of extra work that I'd like to skip in order to save time during the actual live migration. I only have a couple of hours to get it done. I need more time for testing and configuring the systems using the databases.

One of the guys here pointed out that as all the SQL Server version numbers are the same, I could just shutdown both instances of SQL Server and then copy all the *.mdf (data) and *.ldf (log) files to the new server, including those for the system databases, and then just start SQL Server again.

My questions:
- Is this wise / recommended? - Will it work? - Any foreseeable problems?

I'm going to go do a test of this theory now, but I'd like to know what you guys think.

share|improve this question
add comment

1 Answer

This will work

Some gotchas:

  • @@SERVERNAME will be wrong. Fix as per this MSDN sp_addserver example
  • SQL Agent jobs (in msdb) may be "owned" by the old server. You'll have to script and recreate. However, this doesn't apply to SQL Server 2012 from what I can see: it used to for SQL Server 2000 which is the last time I did it....

Note that using DNS to "hide" the physical server is a useful trick. See these

share|improve this answer
    
I confirmed that the server names are the same (@@server and physical server). The new servers are on a completely different network, actually different country. So having the same name is not a problem. I already script the sql jobs as part of my daily backups, so I'll restore them from there. Thank you for warning me about those. –  Daniel Brink Jan 11 '13 at 11:14
    
@DanielBrink: in this case, you're looking good then to simply copy the files. –  gbn Jan 11 '13 at 11:16
    
All you need to do is update the msdb.dbo.sysjobs table and change the server name to match the new server name. –  mrdenny Jan 12 '13 at 5:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.