Create an image
Creating a clone is the next step after creating an image. The video below demonstrates how a clone can be created from an image.
The following properties are set executing the command:
- The clone will be created on the instance SQLDB3 as DB1_C1
- The clone will be saved in the directory “\\sqldb3\psdatabaseclone\clones”
- To have the latest data the command will retrieve the last created image
In the video a credential is used to authenticate to the database server (SqlCredential) and to authenticate to the share (Credential) where the image will be saved. These can all be different credentials but in this example the same credential was used.
The command executed in the video is the following
New-PSDCClone -SqlInstance SQLDB3 -SqlCredential $cred -Credential $cred -Destination \\sqldb3\psdatabaseclone\clones -CloneName DB1_C1 -Database DB1 -LatestImage