DB2 Version 10.1 for Linux, UNIX, and Windows

Cataloging databases

When you create a database, it is automatically cataloged in the system database directory file. You might also use the CATALOG DATABASE command to explicitly catalog a database in the system database directory file.

About this task

You can use the CATALOG DATABASE command to catalog a database with a different alias name, or to catalog a database entry that was previously deleted using the UNCATALOG DATABASE command.

Although databases are cataloged automatically when a database is created, you still might need to catalog the database. When you do so, the database must exist.

By default, directory files, including the database directory, are cached in memory using the Directory Cache Support (dir_cache) configuration parameter. When directory caching is enabled, a change made to a directory (for example, using a CATALOG DATABASE or UNCATALOG DATABASE command) by another application might not become effective until your application is restarted. To refresh the directory cache used by a command line processor session, issue the TERMINATE command.

In a partitioned database, a cache for directory files is created on each database partition.

In addition to the application level cache, a database manager level cache is also used for internal, database manager look-up. To refresh this "shared" cache, issue the db2stop and db2start commands.

Procedure