Options

Why does SQL Clone create VHD Size of 2TB for each clone?

New to SQL Clone and want to understand the technology behind the SQL Clone utilities. I am wondering why a VHD of 2TB is created each time for a cloned DB? Is there a way to change this as some of the cloned DBs I create are very small and do not require 2TB VHDs
Tagged:

Answers

  • Options
    squigleysquigley Posts: 231 Gold 1
    edited March 29, 2024 8:29PM
    Hello Andrew!
    Would highly recommend reading through this documentation to get all the details behind the technology for SQL Clone: https://documentation.red-gate.com/clone/getting-started/how-sql-clone-works

    To quickly mention the relevant bits to your inquiry, SQL Clone works via using the standard disk virtualization technologies built into the Windows Operating System. It creates a Virtual Hard Disk (VHD) containing the image, and another one, called a differencing VHD, or just 'diff file', for each clone, which has a connection, via a VHD mount point, to the remote image.


    SQL Clone makes no changes to the way this virtualization technology works; it merely 'orchestrates' it. Once it has assembled the various 'players' , SQL Clone steps back and lets them play, although it will try to step in and try to help fix things up, if they go awry.

    Using SQL Clone is a two-step process. The first step is creating the image. This is a relatively slow process, roughly equivalent to restoring a database, but this step will be performed relatively infrequently and can be automated, for example so that it runs overnight. The second step is creating one or more clones, from an image. Creating each clone takes only seconds and can also be automated.

    Sean Quigley | Product Support Engineer | Redgate Software

    Have you visited our Help Center?





  • Options
    andrewgibsonandrewgibson Posts: 3 New member
    Thanks Squigley for the answer. 

    I was merely asking about the VHDs and why the 2TB is a pre defined value. I have an instance that has 5 cloned DB images presented to it and in turn this has added 5 2TB VHDs onto the server, none of the Images are anywhere near that size. Is there a way to change the 2TB value to a lower value? 
  • Options
    Hello Andrew,
    Thanks for the update on your end.
    You won't be able to specify the size of the VHD because it's dynamically sized as it needs to expand with changes being made to the clone with additional data added. It may look like it's taking 2TB which is the max size a single VHD is able to take, however the actual size should still be around the database size involved and it might not even be that as it should be the image size plus any additional data added to the clone. 

    Please let me know if you have any other questions or concerns on this.

    Sean Quigley | Product Support Engineer | Redgate Software

    Have you visited our Help Center?





Sign In or Register to comment.