Initialize-SIDataSql
Prepare the Pro database for the data backend
Purpose
Applies the data backend schema (sidata) and the CMDB sync schema to the Pro database. Additive and idempotent.
When to run it
Not needed: every update applies these tables before it installs new code, and the install does it as well. The script stays only for Invardia support.
Who may run it
| Kind | Role | Scope | Why |
|---|---|---|---|
| other | the install identity (service principal + certificate) with db_ddladmin | the Pro database | to create the schema objects |
What it changes
| Where | Action | What | Permission / role | Scope | Why | Undo |
|---|---|---|---|---|---|---|
| Pro SQL database | create | schema sidata (tables, indexes, views) and the CMDB sync schema | the Pro database | the data backend stores here | additive only -- nothing is removed; objects stay |
What it only reads
- the schema file (checked additive before anything)
Parameters
| Parameter | Required | Default | What it does |
|---|---|---|---|
| -Server | no | $(if ($global:SI_Pro_DataSqlServer) { [string]$global:SI_Pro_DataSqlServer } else { [string]$global:SI_ProSqlServer }) | |
| -Database | no | $(if ($global:SI_Pro_DataSqlDatabase) { [string]$global:SI_Pro_DataSqlDatabase } else { [string]$global:SI_ProSqlDatabase }) | |
| -AppId | no | [string]$global:SI_SPN_AppId | |
| -TenantId | no | [string]$global:SI_SPN_TenantId | |
| -CertThumbprint | no | [string]$global:SI_SPN_CertThumbprint |
Preview with -WhatIf
Checks the schema is additive and says what it would apply; the database is not opened.
Undo
Additive only: nothing to undo (no data or object is removed).
Network
It connects to: *.blob.core.windows.net, *.queue.core.windows.net, *.table.core.windows.net, *.vault.azure.net, 169.254.169.254, api.loganalytics.io, api.msrc.microsoft.com, api.security.microsoft.com, api.securitycenter.microsoft.com, api.securityplatform.microsoft.com, database.windows.net, graph.microsoft.com, invardia.com, licenses.nuget.org, login.microsoftonline.com, management.azure.com, monitor.azure.com, portal.invardia.com, storage.azure.com, vault.azure.net
Download and run
Run these lines in PowerShell: the first downloads the script into the current folder, the second runs it.
Invoke-WebRequest https://invardia.com/support/si/Initialize-SIDataSql.ps1 -OutFile Initialize-SIDataSql.ps1
.\Initialize-SIDataSql.ps1To check the download first, compare its SHA-256 with the published one:
SHA-256 d921e88ed720ad0ae2179b6fd2a2317e66f6af6903e2bbb7b04c6f0bd6967d85
Checksums: SHA256SUMS.txt · Version 3.0.79
Before you run it, compare the file's SHA-256 with its line in SHA256SUMS.txt.
Every parameter: Get-Help .\Initialize-SIDataSql.ps1 -Full · Source: Initialize-SIDataSql.ps1
Every script, identity and permission for your security review: SecurityInsight