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.PackageTablesee 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.uspProfilePackageTablesis 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.uspUpdateAlertsis called andAutoTest.dbo.Alerttable is popualted. -
AutoTest.dbo.uspSendAlertEmailsis 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.TableProfileone row per package execution per table per profile executionAutoTest.dbo.ColumnProfileone row per column of a table profiledAutoTest.dbo.ColumnHistogramone row per column value of a table profiled
AutoTest.dbo.Alertcontrols 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.PackageTableone row per table in a package data flow task. indirectly controls which tables are profiled at runtime (seeAutoTest.dbo.vwPackageProfileTable).AutoTest.dbo.vwPackageProfileTablecontrols which tables are profiled at package runtime. queriesMap.PackageTable. one row per table per table to be profiled.
-
The existing
DQMF.dbo.SetAuditPkgExecutionproc is extended to call new procAutoTest.dbo.uspProfilePackagewhen@pIsProcessStart = 0 -
AutoTest.dbo.uspProfileTablepopulates 3 profile tablesAutoTest.dbo.TableProfileTableProfileDateDatabaseNameSchemaNameTableNameRecordCountPkgExecKey
AutoTest.dbo.ColumnProfileColumnProfileDateDatabaseNameTableNameColumnNameDistinctCountPkgExecKey
AutoTest.dbo.ColumnHistogramColumnHistogramDateDatabaseNameTableNameColumnNameColumnValueValueCountPkgExecKey