My webMethods Server 10.15 | My webMethods Server Webhelp | Diagnosing My webMethods Server | Using My webMethods Server Command Line Tools | dbintegritycheck
 
dbintegritycheck
Description
The dbintegritycheck command reviews the dynamic business objects (DBOs) deployed to My webMethods Server to search for potential errors that might have occurred if a DBO was installed or upgraded incorrectly. You can run the dbintegritycheck command on Windows and UNIX at any time. In addition, My webMethods Server automatically executes dbintegritycheck at the following times:
*After a My webMethods Server fix installation.
*When a My webMethods Server fix is rolled back.
*After an over-install upgrade of My webMethods Server.
*During My webMethods Server startup.
To check the integrity of a deployed DBO, dbintegritycheck compares the VARCHAR column data type of the deployed DBO with the metadata for the DBO. If a difference is encountered, dbintegritycheck reports the discrepancy and provides the table name, column name, and data type associated with the discrepancy.
The dbintegritycheck command is located in the following directory:
Software AG_directory /MWS/tools/diagnostics/bin
Syntax
*On Windows: dbintegritycheck.bat
*On UNIX: ./dbintegritycheck
Options
[{-l|--reportLevel} [quiet|full]]
[{o|--output} directory]
[{-s|--server} name]
[{-x|--xml}]
[{-h|--help}]
The following table lists the arguments and options of the dbintegritycheck command-line tool:
Arguments and Options
Description

{-l | --reportLevel} [quiet | full]
Indicates the level of detail you want in the report. Specify one of the following:
*quiet indicates that you want dbintegritycheck to list only the tables, columns, and data types that did not match, that is report only the discrepancies. This is the default.
*full indicates that you want dbintegritycheck to list all tables, columns, and data types and a message stating whether the information matched, indicating it is valid, or did not match, indicating a discrepancy.
{-s | --server} name
Executes dbintegritycheck on another My webMethods Server instance that is available on the local system. Supply the name of the server instance for name .
By default, if you do not use the {-s|--server} option to specify an alternative server instance, the tool executes on the default instance.
{-o | --output} directory
Stores the resulting output to a directory you specify. Supply the directory path where you want the tool to write the output.
By default, if you do not use the {-o|--output} option, dbintegritycheck stores the results in the same directory in which you started the command.
{-x | --xml}
Generates the results in XML files rather than displaying the results in the console window. The tool creates the following two XML files:
*Standard log4j XML report. You can execute loganalyzer against this XML file.
*Structured XML report. You can use this XML file with the envdiff tool.
{-h | --help}
Displays information about the tool and the available options.
Exit Codes
When dbintegritycheck exits, it provides one of the following exit code values:
Exit Code Value
Meaning
0
The dbintegritycheck tool found no errors in the database.
1
The dbintegritycheck tool found discrepancies in the database.
2
The dbintegritycheck tool encountered errors unrelated to the database or cannot be executed for some reason.
Usage Notes
*When you execute dbintegritycheck, specify the {-x | --xml} option to have the results stored as XML files. You can then use other My webMethods Server commands to analyze the results. Specifically, you can use:
*The loganalyzer command. For example, after you execute dbintegritycheck with the {-x | --xml} option so that it produces XML files, you can execute the loganalyzer command, specifying the location of the XML file that is in log4j format. For more information, see loganalyzer.
*The envdiff command. For example, you can compare the results of two different executions of dbintegritycheck with the envdiff command, as described in Usage Notes. For more information, see envdiff.
*My webMethods Server automatically executes dbintegritycheck at startup and logs the results to the _full_.log file. Although it is recommended that you keep this action enabled, you can prevent My webMethods Server from executing dbintegritycheck at startup. To do so, see the topic "Preventing My webMethods Server from Executing dbintegritycheck at Startup" in the PDF publication Administering My webMethods Server.
Examples
*To execute dbintegritycheck on Windows against the server instance named myServer and use the default reporting level that only shows discrepancies, specify the following command:
dbintegritycheck.bat -s myServer
*To execute dbintegritycheck on Windows against the server instance named myServer, set the reporting level to full, and have the tool write the results to XML files, specify the following command:
dbintegritycheck.bat -s myServer -l full -x
*To execute dbintegritycheck on UNIX against the default server instance and write the output to a directory that you specify, use the following command:
./dbintegritycheck -o /opt/softwareag/MWS/tools/diagnostics/bin/output
*To execute dbintegritycheck on UNIX against the default server instance, set the reporting level to full, and have the tool write the results to XML files, specify the following command:
./dbintegritycheck -l full -x
*After you install My webMethods Server, you can execute the following dbintegritycheck command to create a full report so that you have a baseline structured XML file for future reference. On Windows:
dbintegritycheck.bat -l full -x
Save a copy of the generated XML file by renaming the file to something like baseline_db_integrity_check.xml. If you encounter a problem in the future, execute the same dbintegritycheck command again to create a full report that contains the current database contents. You can then use the envdiff tool to compare the two reports to uncover any errors.