ChkDB |
Open Source Rule-Based Data Checking |
|
Home Contact Download Releases Open Source License Project Contributing The PL/SQL Using ChkDB Installation Read-Me Rule-Sets ChkDB Tables E-R Diagram
Tiny Sample External Links Data Quality and Data Profiling (a glossary) |
Running Sample ChecksThis is the sample_checks.sql file that comes with a ChkDB distribution (without the license section).
-- ==============================================================
-- ChkDB - Sample Checks - Run sample checks.
--
-- This script shows how to run sample checks (ie. apply
-- rules) against the sample database using the sample
-- rule-sets in the CHKDB_SAMP_HR domain.
--
--
-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-- Do a check (a couple of examples)
-- Apply active rules in active rule-sets
-- for specified active tables in an active domain.
--
-- Note: Before rules are applied to a table, all rows
-- in CHKDB_RESULT for that table are first deleted.
-- which means that:
-- If two people are independently doing checks against
-- the same table, one of them should be using a view
-- or a copy of the table with a different name so that
-- their checks do not interfere with each other.
-- Check the CHKDB_SAMP_HR_DEPT table...
call CHKDB_CHECK_DB.APPLY_RULES ('CHKDB_SAMP_HR',
'CHKDB_SAMP_HR_DEPT');
-- Multiple tables may be checked in one call by using
-- the wildcard character '%' in the table-name...
call CHKDB_CHECK_DB.APPLY_RULES ('CHKDB_SAMP_HR',
'CHKDB_SAMP_%');
-- Note that this last call will override the results of
-- the previous call.
-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-- If You Get Errors Running Checks...
--
-- If you get errors when you run CHKDB_CHECK_DB.APPLY_RULES,
-- it may be a problem with how rules are specified in the
-- CHKDB_RULE table.
--
-- See the table CHKDB_RULE_ERR - if an error occurs as a
-- result of a bad rule, it will be described in this table.
--
-- The table CHKDB_RULE_SQL contains the SQL generated for
-- rules that are executed.
--
-- See the README.txt file for more information.
--
--
-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|