PowerShell script: deploy_script.ps1
prompts for server then drops and creates all Sql AutoTest objects.
ajds
just do it.
TODO see issues.
- C# app is a ran to populate/update
Map.PackageTable
see SqlServerUtilities
Package runs as usual at end of package DQMF.dbo.SetAuditPkgExecution
is called with @pIsProcessStart = 0
and AutoTest.dbo.uspAutoTestPackage
is called:
AutoTest.dbo.uspProfilePackageTables
is called
For each table in Map.PackageTable
for this package AutoTest.dbo.uspProfileTable
is called thereby populating: AutoTest.dbo.TableProfile
, AutoTest.dbo.ColumnProfile
, and AutoTest.dbo.ColumnHistogram
are populated.
-
AutoTest.dbo.uspUpdateAlerts
is called andAutoTest.dbo.Alert
table is popualted. -
AutoTest.dbo.uspSendAlertEmails
is called
If rows exist in AutoTest.dbo.Alert
for this package execution single summary email is sent with
For a given table: Profiles a single table and populates profile tables: AutoTest.dbo.TableProfile
, AutoTest.dbo.ColumnProfile
, and AutoTest.dbo.ColumnHistogram
For a given package: Calls AutoTest.dbo.uspProfileTable
for each table in Map.PackageTable
Merge statement is executed to update/insert AutoTest.dbo.Alert
from profile tables.
For a given package execution: AutoTest.dbo.Alert
is queried and if alerts are found an alert email is sent using msdb.dbo.sp_send_dbmail
logging tables that profile results.
AutoTest.dbo.TableProfile
one row per package execution per table per profile executionAutoTest.dbo.ColumnProfile
one row per column of a table profiledAutoTest.dbo.ColumnHistogram
one row per column value of a table profiled
AutoTest.dbo.Alert
controls content of alert emails. one row per alerted violation. a violation can be in terms of a profiled table, column or a column value.Map.PackageTable
one row per table in a package data flow task. indirectly controls which tables are profiled at runtime (seeAutoTest.dbo.vwPackageProfileTable
).AutoTest.dbo.vwPackageProfileTable
controls which tables are profiled at package runtime. queriesMap.PackageTable
. one row per table per table to be profiled.
-
The existing
DQMF.dbo.SetAuditPkgExecution
proc is extended to call new procAutoTest.dbo.uspProfilePackage
when@pIsProcessStart = 0
-
AutoTest.dbo.uspProfileTable
populates 3 profile tablesAutoTest.dbo.TableProfile
TableProfileDate
DatabaseName
SchemaName
TableName
RecordCount
PkgExecKey
AutoTest.dbo.ColumnProfile
ColumnProfileDate
DatabaseName
TableName
ColumnName
DistinctCount
PkgExecKey
AutoTest.dbo.ColumnHistogram
ColumnHistogramDate
DatabaseName
TableName
ColumnName
ColumnValue
ValueCount
PkgExecKey