[SQL Clone home]
These pages cover SQL Clone Technical Preview 0.2 to 0.3, which is not the latest version. Help for other versions is also available.
Remove the InstantClone snapshot.
Remove-InstantCloneSnapshot -SnapshotName <string> [-SharedSnapshot] [<CommonParameters>] |
This deletes the snapshot file. You cannot delete a snapshot with clones.
-SnapshotName
<System.String>
The name of the snapshot to remove. If there are multitple snapshots with the same name, the most recent one is removed.
| Aliases | None |
| Required? | true |
| Position? | named |
| Default Value | None |
| Accept Pipeline Input | false |
| Accept Wildcard Characters | false |
-SharedSnapshot
<System.Management.Automation.SwitchParameter>
If it is a shared snapshot, you must include this switch.
| Aliases | None |
| Required? | false |
| Position? | named |
| Default Value | False |
| Accept Pipeline Input | false |
| Accept Wildcard Characters | false |
-All
<System.Management.Automation.SwitchParameter>
Remove all snapshots with no clones. Warning: This may remove shared snapshots that are used by other clients.
| Aliases | None |
| Required? | true |
| Position? | named |
| Default Value | False |
| Accept Pipeline Input | false |
| Accept Wildcard Characters | false |
-SnapshotId
<System.String>
The Id of the snapshot you want to remove.
| Aliases | None |
| Required? | true |
| Position? | named |
| Default Value | None |
| Accept Pipeline Input | false |
| Accept Wildcard Characters | false |
<CommonParameters>This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.
The input type is the type of the objects that you can pipe to the cmdlet.
The output type is the type of the objects that the cmdlet emits.
|
This drops the snapshot AdvSnap1.
|
This shows creating a shared snapshot, and then removing it. When removing shared snapshots, you must specify -SharedSnapshot.
|
This shows a full-cycle of AdvWorks2012. (1) AdvWorks2012 is saved as a snapshot. (2) This is cloned as AdvClone1 (3) This clone if removed. (4) The snapshot is no longer needed, so is removed.
|
This creates three snapshots, and creates a clone from one of them. Remove-InstantCloneSnapshots -All will remove snapshots AdvSnap1 and AdvSnap3, leaving AdvSnap2 because it has a clone. Shared snapshots and local snapshots must be done separately; use the -SharedSnapshot switch.