clone SQL server?

  • My company is going to create a new test environment, which will clone from servers in Production.

    The server team plan to copy only the drive that has SQL installation assemblings and let DBA to restore database from backups to the new test servers (VM). Is that possible? Can SQL server start correctly with only system databases ( which copied in the drive that has SQL installation assembling)???

  • What about all the necessary registry settings? The the hooks into windows services, etc

    Clone the system drive (c drive) and make a new machine out of that might (should even) work. If the installation files are on a drive other than C, highly unlikely.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • clare.xia (1/11/2012)


    My company is going to create a new test environment, which will clone from servers in Production.

    The server team plan to copy only the drive that has SQL installation assemblings and let DBA to restore database from backups to the new test servers (VM). Is that possible? Can SQL server start correctly with only system databases ( which copied in the drive that has SQL installation assembling)???

    There's so much can go wrong with this, presumably you'll change the service account when cloning? If you do this will cause issues with the service master key which if you have linked servers will be a bug bear. Clone the C drive by all means but carry out a clean install of SQL server if you can.

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • We've created VMWare SQL Servers from physical SQL Servers without any issues.

  • The primary issues I've experienced with this have been related to the renaming of the server. Yes, you can create a clone, SQL will start with only the system databases, and all other databases will be suspect. If you create the same disk structure for the SQL user database files and copy the files from production (while SQL is stopped) then these should also come up.

    This doesn't mean everything will work as SQL can be very sensative about having her name changed. In the end the amount of work you do is going to be much the same whether you just clone the OS and reinstall SQL or try clone the whole server and fix all the little gotchas.

    I'd opt for a clean build from scratch as the best option, second an OS clone and SQL install. Avoid a full clone if possible.

    Cheers

    Leo

    Leo
    Nothing in life is ever so complicated that with a little work it can't be made more complicated.

  • Leo.Miller (1/12/2012)


    This doesn't mean everything will work as SQL can be very sensative about having her name changed.

    Most stuff works fine after a rename, replication doesn't, there's probably a few other things that break too, but it's easy to fix, just have to change the server name in sys.servers

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • if its a virtual machine, then take ghost copy and you are good to go.

    Just make sure the disk are configured in the same way as it is in existing environment.

    Also second approach will be backup restore. Why are you not considering this?

    ----------
    Ashish

  • We have used VMWare to clone an existing SQL Server. However, the purpose of this was to move the install from older hardware to new hardware. It works seemlessly.

    Note on this: The ones we have done are low end basic installs which are like single db very small userbase with no linked servers, no DTS/Integration Pkgs, no replication and no servername changes.

  • Thank you for all the replies!

    The server team is going to use VMWare to clone SQL Servers to virtual machines. If the original SQL server is clustered, the cloned one will not be clustered. There is no replication, linked servers or log shipping.. some database are huge though ( greater than 200G). Is backup and restore a better option then?

    Thanks

  • Hello Frnds,

    We are in a requirement of 20 New SQL servers (2K8). We are building one new VM and installing SQL in that and remaining 19 servers we are going to clone.

    Please let me what all things I should consider. Are there any Risks or dependencies involved.

    I have gone through many blogs but could not get enough info. Please guide me as we have to give the estimates and risk asap.

    Thanks a billion...

  • you may have atleast execute the following commands after completion of cloning (which is not a good idea in the first place if you are using features like replication)

    1) sp_dropserver "original server name that used for cloning"

    2) sp_addserver "name of newly cloned server", local

    From my perspective a better option will be create a unattended SQL server installation on one of the server and then run that on the rest of the servers, this way you can ensure that the task can be completed quickly and also ensure uniformity without having to worry or repent later on about downsides of cloning from a SQL Server perspective.

    if you have the requisite expertise you can also plan for powershell installation on all the servers.

  • Thanks Vikrant For the reply..

    I was wondering if some one has done this in any environment, I wanna avoid future issues where my client gonna build there whole infrastructure..

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply