Initial Oracle Deep Data Security lab kit
This commit is contained in:
21
scripts/reset-scenario.ps1
Normal file
21
scripts/reset-scenario.ps1
Normal file
@@ -0,0 +1,21 @@
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Scenario,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$ConnectString,
|
||||
|
||||
[string]$SqlClient = "sql"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$repoRoot = Split-Path -Parent $PSScriptRoot
|
||||
$resetScript = Join-Path $repoRoot "scenarios/$Scenario/sql/99_reset.sql"
|
||||
|
||||
if (-not (Test-Path $resetScript)) {
|
||||
throw "Reset script not found: $resetScript"
|
||||
}
|
||||
|
||||
Write-Host "Resetting scenario $Scenario"
|
||||
& $SqlClient $ConnectString "@$resetScript"
|
||||
Reference in New Issue
Block a user