Check for consistency between catalog tables (optional)
The DSNTESQ queries check the logical correctness of the Db2 catalog.
Before you begin
- Ensure that Db2 12 is at the appropriate service level. See Required maintenance for Db2 13 installation or migration.
- Before you run these queries, complete Verify the integrity of Db2 table spaces (optional) to run the DSN1COPY utility with the CHECK option and the CHECK DATA and CHECK INDEX utilities.
Tip: For best results, use this process to check the Db2 catalog regularly, even outside of the migration process.
Procedure
To check for consistency between catalog tables:
Run the queries that are not commented out in member DSNTESQ of the prefix.SDSNSAMP library that is provided with Db2 12.
- You can execute the SQL statements in DSNTESQ from SPUFI or from a dynamic SQL program like DSNTEP2.
- You can run the queries on the actual catalog tables or on
mirror
copies of the catalog tables. If you run the queries on the copies, use the comment lines in member DSNTESQ for guidance. By running queries on copies of the catalog table, you reduce contention on the catalog.