Remove-EdFiSandboxDatabases

Description

Remove all sandbox ODS databases

Syntax

Remove-EdFiSandboxDatabases [-masterCSB] <DbConnectionStringBuilder> [-edfiOdsTemplateCSB] <DbConnectionStringBuilder> [-Engine]
<String> [<CommonParameters>]

Parameters

Name

Alias

Description

Required?

Pipeline Input

Default Value

-masterCSB


A CSB with sysadmin credentials on the database server

true

false


-edfiOdsTemplateCSB



true

false


-Engine



true

false


"CSB" stands for ConnectionStringBuilder.

$csb = New-Object System.Data.SqlClient.SqlConnectionStringBuilder

# Some available properties
$csb["Data Source"] = $server
$csb["Initial Catalog"] = $database
$csb["Encrypt"] = $true
$csb["TrustServerCertificate"] = $false
$csb["Integrated Security"] = $false
$csb["User ID"] = $login
$csb["Password"] = $password

Examples

EXAMPLE 1

Remove-EdFiSandboxDatabases -masterCSB $masterCSB -edfiOdsTemplateDbName "EdFi_Ods_{0}"

In this example, the function looks for databases that begin with the string "EdFi_Ods_Sandbox_" and deletes them.