Use of ODBC for querying the Db2 catalog

You can use Db2 ODBC catalog query functions and direct catalog queries to the Db2 ODBC shadow catalog to obtain catalog information.

Often, an application must obtain information from the catalog of the database management system. For example, many applications use catalog information to display a list of current tables for users to choose and manipulate. Although you can write your application to obtain this information with direct queries to the database management catalog, this approach is not advised.

When you use catalog query functions in your application, queries to the catalog are independent of the way that any single database server implements catalogs. As a result of this independence, applications that use these functions are more portable and require less maintenance.

You can also direct catalog query functions to the Db2 ODBC shadow catalog for improved performance.