When using structured types, typed tables and typed views, another set of views of the catalog provide more useful information than the SYSCAT and SYSSTAT catalog views. These views are not created automatically. The views are created in the OBJCAT and OBJSTAT schemas and SELECT privilege on all views is granted to PUBLIC by default.
WARNING: |
This set of views is for temporary use only until the next version that supports catalog migration. Applications should not presume that these views exist in every database and should consider that these catalog views may not be provided in future versions. The information from these views will be supported through the SYSCAT and SYSSTAT views in a future version. |
The views can be created by following these steps.
db2 -tvf sqllib/samples/clp/objcat.clp
In an OS/2 or Windows based system, issue the command:
db2 -tvf sqllib\samples\clp\objcat.clp
Note: | If the database already includes schemas called OBJCAT and/or OBJSTAT, you may need to make your own copy of the file objcat.clp and change the schema names in the second and third CREATE SCHEMA statements to suitable names. |
The statements in the OBJCAT.CLP file will create all OBJCAT and OBJSTAT catalog views. There is an OBJCAT catalog view corresponding to each SYSCAT catalog view, and one OBJSTAT updatable catalog view corresponding to each SYSSTAT updatable catalog view.
This appendix contains a description of the OBJCAT and OBJSTAT catalog views for which the column definitions and/or acceptable values differ from their corresponding SYSCAT and SYSSTAT views. For views that have identical definitions as their SYSCAT and SYSSTAT counterparts, the reader is referred to those for column definitions.
The catalog views are updated during normal operation in response to SQL data definition statements, environment routines, and certain utilities. Data in the catalog views is available through normal SQL query facilities. Columns have consistent names based on the type of objects that they describe: