February 29, 2012 at 3:49 am
Hi,
I as a DBA have a task to move a 2008 SQL Server from a VM to a Physical machine. there might be some tools to do this job but our budget does not approve it so I have a tough task to move everything in pieces.
I have performed such migrations by migrating all the logins, databases, jobs,linked servers etc. piece by piece but today I got an idea of doing this differently.
Lets assume that I have same number of drives with same notations(C,D and so on). Then, I move backup files of master,msdb,model and other user databases. then using trace flags, restore master and msdb and then making sure that I put the data and log files on exactly the same location so that when I remove trace flag(master only mode) and restart the server, I get a replica of server plus all the logins,jobs,linked server and all such features.
Please suggest about this dirty approach before I start applauding myself😛
Thanks
Chandan
February 29, 2012 at 4:35 am
I dont think you will personally have a problem with this as long as you are moving to the same version.
The only thing I would say is that with backing up and restoring master database you will have to use sp_dropserver and sp_addserver if your doing a side by side migration, where you configure the physical box first while the VM is running and then at the maintenance window do the restores?
The alternative would be to build the physical machine with the same name but off the network. Backup all of the VM to a file server. Shut down the VM. Attach the physical machine to the network. Do the restores test and if all is good then ok, if not its power off the physical and power on the virtual machine.
Dont destroy the VM for a few days just incase you need to migrate back due to any issues.
February 29, 2012 at 3:58 pm
full machine backup and subsequent restore to the physical box would be my chosen avenue
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
March 1, 2012 at 12:26 am
Perry Whittle (2/29/2012)
full machine backup and subsequent restore to the physical box would be my chosen avenue
How do we do that. Is this something done by a sysadmin and not a DBA?
Thanks
Chandan
March 5, 2012 at 4:35 am
You virtual OS image exists on a VHD or similar. Why not get the physical server to boot to the same VHD?
The first time you do this, boot into safe mode and when you get the logon screen immediately reboot without logging on. If you try to log on on at the first reboot Windows gets confused and stops responding. It will often also stop responding if you wait too long between the logon screen appearing and doing the reboot. This reboot will go through the process of replacing some of the critical harware drivers with what is needed for your physical server.
The second reboot can be a normal reboot. After you log on you will have to reactivate Windows and after that you are good to go.
This process has worked for me on W2003, W2008, W2008 R2, and Win 7. However, with W2003 you change between a physical and a virtual server without needing to reactive Windows.
Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.
When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply