validatedb

Validates the integrity of a schema repository and a user database based on the rules or rule groups specified.

Synopsis

Note: This command can only be run from the cqdiagnostics.pl script. This script contains variables that correspond to all the parameters required by the command. Edit the script to specify the validatedb command and the values for the database(s) to be tested and run the script. The script is installed to Rational® ClearQuest® installation directory. The default location is cquest–home–dir\diagnostic\cqdiagnostics.pl. For more information about using the script, see Using the Rational ClearQuest Diagnostics utility.
validatedb –rulefile rule file -logfile log file [–resultsfile results file ] [ –rulenames rule names... | –rulegroups rule groups... | –allrules ] -dbinfoschemarepo db_vendor server [ :port_no ] database user_login user_password connect_options [ -dbinfouser cqdb_logicalname db_vendor server [ :port_no ] database user_login user_password connect_options ] [ –validateuserdbonly ] [–locale locale_name]

Description

Use the validatedb subcommand to validate the integrity of a schema repository or user database against a set of specified rules or rule groups. A rule file contains the rules and rule groups that may be used. Each rule represents a constraint used to determine the integrity of the tested database. A rule group is a collection of rules. The tool validates the following aspects of a database:
  • Structure of a schema repository (tables, columns, indexes).
  • Integrity of the data. The command verifies that all data entered into the database is from the same code page as the Rational ClearQuest data code page of the schema repository.
  • Structure of a user database (tables, columns, indexes).

Rule severity

The validatedb command reports rule violations according to the following severity levels:
  • [Severity = FATAL_ERROR] The tool encounters a violation that prevents it from continuing testing because the violation would cause most subsequent rules to fail. The console displays the level of severity and the violation and halts all further testing until the error is resolved. The results are also printed to the log file, and to a results file, if directed.
  • [Severity = ERROR] The tool encounters a violation, but the violation does not cause the tool to cease testing. The console displays the level of severity and the violation and continues testing. The results are also printed to the log file and to a results file, if directed.
  • [Severity = WARNING] The tool encounters a potential violation. The console displays the level of severity, and the violation and continues testing. The results are also printed to the log file and to a results file, if directed.
  • [Severity = RECOMMENDATION] The tool provides a recommendation to a violation or potential violation and continues testing. The results are also printed to the log file and to a results file, if directed.
  • [Severity = INFORMATIONAL] The console displays information specified by the rule definition. These violations require manual intervention according to the rule's definition. Testing continues and the results are printed to the log file and results file if directed.

Output of validatedb

The utility provides the following information:
  • A summary of the input parameters
    • Path to the rules file.
    • Path to the results file (if specified).
    • Path to the log file.
    • Summary of the database information you provided.
  • The execution progress and result status for each rule.
    • Execution Status. The execution status indicates which rule is currently being executed, the number of rules executed out of the number of rules invoked, and any rule violations that occur.
    • Result Status. If the database does not violate a rule, the console confirms the execution of a rule as complete. If the database violates a rule, the console provides the severity of violation, and the violation.
  • A results summary after the run terminates. The run summary has two sections, the informational summary and the summary of results.
    • Information Summary. All rule violations of severity level, INFORMATIONAL are written in this section.
    • Summary of Results. The summary of results provides this information:
      • Number of rules invoked.
      • Number of rules executed.
      • Number of rules completed.
      • Number of violations for each severity level.

This output writes to the log file and results file, if specified.

Options and arguments

-rulefile
Specifies the rule file that contains the rules to test against a database. This option validates the database against all the rules in the rule file. See theExamples below.
-logfile
Provides a detailed record of all events that occur during the execution of a command. See the Examples below.
-resultsfile
Provides the test results. The results file does not provide the detailed event information that the log file provides. If the database does not violate the specified rule, the results file indicates that execution of the rule is complete. If the database violates the rule, the results file provides the severity of violation, and the violation. See the Examples below.
-rulenames
Specifies the name of a rule within the rule file to test. To specify multiple rules in one command, insert one empty space between each rule name. See the Examples below.
-rulegroups
Specifies a rule group within the rule file to test. Use this option to test multiple rules against a database without having to call each rule individually. To specify multiple rule groups in one command, insert one space between each rule group name. See the Examples below.
-allrules
Tests all rules in the rule file.
-dbinfoschemarepo
Specifies the schema repository to validate. This option provides the information needed to locate and access the schema repository. See Table 1 for the -dbinfoschemarepo parameters.
-dbinfouser
Specifies the user database to validate. See Table 1 for the -dbinfouser parameters.
Table 1. Parameters for the -dbinfoschemarepo and -dbinfouser options
db_vendor server [:port] database user_login user_password connect_options
SQL_SERVER Server machine name or IP database name login name login password none
ORACLE Server machine name or IP SID login name login password Oracle connect options
MS_ACCESS Physical location of database none none none none
DB2® Server machine or IP database name login name login name none
-validateuserdbonly
Specifies to validate only the user database.
-locale
Specifies which language to use in the output. The results file and console offer alternative languages. The log file is written only in English.

Examples

To run the validatedb command, you must be in the following location: cquest–home–dir\diagnostic\.
Note: This command can only be run from the cqdiagnostics.pl script.

Feedback