Creating a Db2 repository database

You can create a Db2® repository database by using the Db2 administration tool of your choice, such as the Db2 command line processor.

Before you begin

  • Ensure that a supported version of the database is installed on the system on which you want to host the repository database (Db2 version 11.1 or later). For more information, see System requirements for IBM Db2 Data Management Console.
  • Ensure that Oracle compatibility is disabled on your repository database. Differences in how timestamps are calculated in this mode will cause the Data Management Console to fail.
  • When running the CREATE DATABASE command, ensure that the AUTOMATIC STORAGE option is set to YES.
  • Create or identify a database user ID that will be used by IBM® Db2 Data Management Console to connect to the repository database. This user ID must have the following minimum authorities:
    • DBADM WITH DATAACCESS on the database
    • SYSCTRL on the database instance
  • The repository database should have the following minimum log settings:
    LOGPRIMARY 25
    LOGSECOND 200
    LOGFILSIZ 8192
  • While you can create a repository database within a Db2 instance that is shared with other applications, an ideal repository database would reside in a dedicated Db2 instance, particularly when a large number of databases are monitored and managed. The repository would not compete with other applications and databases that may require more resources for your business needs. For best results, consider using the most recent version of Db2, and enable adaptive compression and Db2 storage optimization to best compress the resulting data.
    Note: It is recommended to use circular logging when you create a repository database. For more information, see Circular logging.

Procedure

To create a Db2 repository database and configure the database logs with the Db2 command-line processor:

  1. Run the CREATE DATABASE command. For example, to create a database named REPODB with a page size of 32 KB for all table spaces, type the following command from a command prompt on the system that is running Db2:
    db2 create database repodb pagesize 32 k
    Note: The default page size is 8 KB.
  2. Use the UPDATE DATABASE CONFIGURATION command to configure the database.
    For example, to configure the REPODB database with the recommended log file settings, and to enable the EXTENDED_ROW_SZ parameter, run the following commands:
    
    db2 UPDATE DATABASE CONFIGURATION FOR repodb USING LOGPRIMARY 25 LOGSECOND 200 LOGFILSIZ 8192
    db2 UPDATE DATABASE CONFIGURATION FOR repodb USING EXTENDED_ROW_SZ enable
    Note:

    Enabling the EXTENDED_ROW_SZ parameter for a repository database is mandatory.