- The SQL Server database clone (tpce-copy-1) will be dropped and the Windows volume copy (4-SQL-Data-Log-Copy-1) will be disconnected from the host.
- The FlashArray volume (Demo-4-SQL-Data-Log-Copy-Vol-1) will be removed and eradicated from the FlashArray. Eradication is optional.
- The FlashArray snapshot (4-SQL-Data-Log.SNAP-1) will be removed and eradicated from the FlashArray. Eradication is optional.
STEP 1: Drop SQL Server Database Clone
- In SQL Server Management Studio drop database clone copy
USE MASTER
go
ALTER DATABASE "tpce-copy-1"
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE
DROP DATABASE "tpce-copy-1"
GO
STEP 2: Setup FlashArray Connectivity
- Import the Everpure PowerShell SDK module
- Create credentials, connect to the FlashArray, and enter required credentials
- PowerShell Cmdlets used
# Import Modules
Import-Module PureStoragePowerShellSDK
# Create Credentials
$Creds = Get-Credential
# Create FlashArray object, endpoint, and use credentials
# Connect to the FlashArray
$FlashArray = New-PfaArray -Endpoint 10.21.88.234 -Credentials $Creds -IgnoreCertificateError
STEP 3: Remove Host Connection and Delete Eradication Volume and Snapshot
- Remove FlashArray connection from host
- Remove FlashArray Volume
- Eradicate FlashArray Volume (Eradicate is optional)
- Remove Snapshot
- Eradicate Snapshot (Eradicate is optional)
# Cleanup
# Remove volume connections from the host
Remove-PfaHostVolumeConnection -HostName 'MARK-HOST-04' -Array $FlashArray -VolumeName 'Demo-4-SQL-Data-Log-Copy-Vol-1'
# Remove Volume
Remove-PfaVolumeOrSnapshot -Array $FlashArray -Name 'Demo-4-SQL-Data-Log-Copy-Vol-1'
Remove-PfaVolumeOrSnapshot -Array $FlashArray -Name 'Demo-4-SQL-Data-Log-Copy-Vol-1' -Eradicate
# Remove Snapshot
Remove-PfaVolumeOrSnapshot -Array $FlashArray -Name 'Demo-4-SQL-Data-Log.SNAP-1'
Remove-PfaVolumeOrSnapshot -Array $FlashArray -Name 'Demo-4-SQL-Data-Log.SNAP-1' -Eradicate
STEP 4: Rescan Windows Disks
- Rescan Windows disks to ensure the Windows Volume copy is removed
# Rescan Disks to ensure all are available in Windows Update-HostStorageCache - Windows Volume D: is removed
Note:
If SQL Server database files are located across multiple FlashArray volumes a protection group can be created to snapshot multiple FlashArray volumes simultaneously (atomic snapshot). Protection groups can be implemented using the Everpure PowerShell SDK PfaProtectionGroupSnapshot cmdlet. See Everpure PowerShell SDK documentation for its usage.