A customer asked if a new image could be created from a database that was itself a SQL Clone. It can, and I’ll show that in this post.
This is part of a series of posts on SQL Clone, which is a virtualization product from Redgate Software.
Creating a New Image
To start with, I’ll look at the clones that I have deployed on a test server. As you can see below, I have a database, called “SimpleTalk”, on a local instance.
I’m going to use this to create an image. First, I’ll click “Create Image” on the left. I’ll choose SQL Server, since I will use the existing cloned database as the source.
I pick the instance and database. As you can see, I’ve chosen the database that was listed above as a clone.
Next we skip the classification screen. This is a test db, so no data in there to worry about.
I’m not going to modify this, as this is a test.
Now I pick the destination, which is a local share.
I give this a name which differentiates from the original db and other images. I normally want to name all images as _new or _current for rotation purposes, but here I’m adding a test name since I’ll delete this right away.
You can see this start working.
And it completes in about the time for a restore. If I had added masking, this would run a little slower.
I have the image created, so it’s time to test this with a new database.
Validating the Image with a Clone
Click “Create clone” on the left menu and you get a dialog that asks for an image. I’ll pick the one I created above.
Once we chose the image, we can modify it. We won’t here.
Now we add an instance and a name. I’ve entered those below.
Once this completes, I can see this database, and my other clone in the SSMS Object Explorer.
If I query both databases, I get the same data, since I haven’t changed either one during this process. Note below that each one of these queries is from a cloned database.
The SQL Clone cloned database is just a database. SQL Server sees it as any other database, as SQL Clone presents the mdf/ldf/ndf as any other database. You can back it up like any other one.
If you are looking to save storage space for multiple copies of databases, or give each user a consistent copy in seconds, check out SQL Clone.