How can we help you today? How can we help you today?

Can run run a masking as part of a clone template.

I know you can add a masking set as a modification when creating a clone. But can you run a masking set against a clone, has part of a clone template?
glennsharrock
0

Comments

1 comment

  • squigley
    Hello Glenn,
    Thanks for your inquiry with SQL Clone.
    This should be possible via the RedGate.SqlClone.Client.Api.Objects.ModificationScriptResource modifications parameter mentioned in this page:
    https://documentation.red-gate.com/clone/automation/powershell-cmdlet-reference/new-sqlclonetemplate|

    You can see an example of this in action below via Example 5:
    https://documentation.red-gate.com/clone/automation/powershell-cmdlet-reference/new-sqlcloneimage
    Connect-SqlClone -ServerUrl 'http://sql-clone.example.com:14145'$SqlServer = Get-SqlCloneSqlServerInstance -MachineName 'WIN201601' -InstanceName 'SQL2016'$ImageDestination = Get-SqlCloneImageLocation -Path '\\red-gate\data-images'
    $maskingScript = New-SqlCloneSqlScript -Path \\red-gate\data-scripts\mask-emails.sql$permissionsScript = New-SqlCloneSqlScript -Path \\red-gate\data-scripts\change-permissions.sql
    $ImageOperation = New-SqlCloneImage -Name "AdventureWorks-$(Get-Date -Format yyyyMMddHHmmss)" `-SqlServerInstance $SqlServer `-BackupFileName @('\\red-gate\backups\AdventureWorks-201701012210.bak') `-Destination $ImageDestination `-Modifications @($maskingScript, $permissionsScript)
    $ImageOperation | Wait-SqlCloneOperationPlease let me know if you have any other questions or concerns on this.

    Thanks!
    squigley
    0

Add comment

Please sign in to leave a comment.