Implementing Siebel eBusiness Applications on DB2 UDB for z/OS and OS/390 > Siebel Repository Import, Export, and Postinstallation Tasks > Postinstallation Tasks for the Siebel Repository >
Validating the Siebel Schema
After installation and repository import, you should compare the physical database schema with the repository to make sure that there are no inconsistencies. This is accomplished using the Siebel Server utility dbchck.exe (Windows) or dbchck (UNIX), located within the binary subdirectory of your Siebel Server installation directory.
You can use the dbchck utility to validate data relationships, including foreign keys and the list of values. You can also use this utility when you have made changes to the extensibility of your Siebel database.
The most popular mode in which to run dbchck is using the option
/dict /all. This option provides a comprehensive log file that lists all of the discrepancies between the logical data model defined in the repository you specify and the physical database schema in the Siebel database you run the utility against.
To run dbchck
- From the binary subdirectory of your Siebel Server installation directory, locate dbchck.exe or dbchck, depending on your OS platform.
- If your midtier platform is Windows, delete the diccache.dat file before running dbchck. But be sure that no EIM or Siebel Remote operations are running before deleting it.
The dbchck utility creates a new diccache.dat file as a first step before proceeding with the integrity check. By deleting the dictionary cache file before starting, you make sure that dbchck validates against the Siebel Repository you specify.
NOTE: If you had to stop any EIM or Siebel Remote processes, you can safely restart them after dbchck has run.
- Source environment variables as appropriate for your platform, as described earlier in this chapter, using either siebenv.bat (for Windows) or siebenv.sh or siebenv.csh (for UNIX).
Environment variable scripts are located in the binary subdirectory of your Siebel Server installation directory.
- Source the database profile.
- Run dbchck
using the following syntax:
dbchck /u SADMIN /p
password /t SIEBTO /r "
Your Siebel Repository Name" /l dbchck.log /dict /all /s
ODBC data source
password = login password to the database.
Your Siebel Repository = the repository that you want to compare against the physical data model; in the installation, the default value is
NOTE: You must specify your repository name within quotation marks ("") after the repository name parameter (
ODBC data source = the ODBC data source applicable to the repository.
/t) = the Siebel Schema Qualifier.
NOTE: To see a list of all dbchck parameters with their descriptions, use option
Any discrepancies found appear on the screen. Detailed information is written to a log file in the
binary directory of your Siebel Server installation directory (siebsrvr).
NOTE: The log file name is whatever name you specified after the log file parameter (
/l). In the example above, the file is named dbchck.log.
- Review the log file generated as a result of running this script. Any discrepancies are flagged as failures.
- You should investigate all discrepancies.
Investigating Discrepancies in the dbchck Log
After completion of the dbchck.exe script, the log file generated may contain discrepancies noted as failures. However, some failures are expected due to the index length restriction.
One expected error follows:
These messages in the dbchck.log file are expected and are caused by the index length restriction of 255 bytes that applies to indexes created on the OS/390 platform. The truncated indexes will not necessarily cause any issues as some of these tables with truncated indexes will not be used in the application. However, the truncated indexes should be reviewed to see whether any of these need to be addressed based on your business requirement.
Some errors noted in the dbchck.log file are not acceptable and should be addressed. An example of such an error follows:
Dictionary column FIN_PERIOD_ID not in physical schema!
Dictionary different from physical schema for column
dictionary: REVISED_COST numeric(22,7) null
physical: REVISED_COST decimal(10,0) null
This error is due to a mismatch in the data type of the column in the logical and physical schema. Columns in logical and physical schema should always be synchronized as far as the column definition is concerned.
You will need to correct this mismatch in Siebel Tools in order to synchronize with the physical schema. Once this is done, run dbchck.exe again.
For more information about using and troubleshooting dbchck.exe, see the FAQ 1128 document and the Troubleshooting Steps 20 document on Siebel SupportWeb.