IBM®
Db2® Data Management Console uses the repository database to enable Monitor, Run SQL, and Explore features.
Before you begin
The
IBM
Db2 Data Management Console
will use the ID and password that you provide to create the necessary objects in the repository
database. Make sure that the account you use has been granted the proper privileges to enable a
repository database:
About this task
You must set up a repository database before you use the
IBM
Db2 Data Management Console.
Note: You
cannot assign the same repository to multiple instances of IBM
Db2 Data Management Console at a time.
Procedure
- To configure the repository database by an administrator:
- Configure the repository database to create the required objects and tables by using
one of the following methods:
Method 1- By using web console:
- Log in to IBM
Db2 Data Management Console as the user with admin
privilege.
- Click Administration and go to.
- In the Repository page, enter the connection parameters for your repository
database, along with the credentials of the repository database owner. You can also select the
repository schema for your database.
- Click Save.
Method 2- By customizing and executing the DDLs on the Db2 server:
- Customize the create.sql script in the following
directory:
<IBM Db2 Data Management Console installed directory>\samples\DB2LUW\
Note: You
can not customize the default schema IBMCONSOLE, and the tables/views definition.
- Log into Db2 with DBADM, and execute the customized
create.sql script to create the necessary objects in the repository database.
- Log into IBM Db2 Data Management Console as the user with admin privilege.
- Click Administration and go to
.
- In the Repository page, enter the connection parameters for your repository
database, along with the credentials of the repository database owner created by the customized
create.sql script.
- Click Save.
- To configure a repository database by a Db2 user:
- Enable the Db2 user to be the owner of the
repository database using the following steps:
- Log into a Db2 instance, using a Db2 ID that has the DBADM privilege.
- Create the database that you will use as your IBM
Db2 Data Management Console repository
database.
- Grant the required authorities and create the needed objects by executing the statements which
are located in
<IBM Db2 Data Management Console installed directory>\samples\DB2LUW\pre-create.sql
For
example, you can enable a user account TOM as the owner of the IBM
Db2 Data Management Console repository.
- Log into Db2 using the user account (for example: TOM) and
navigate to DB2LUW
directory.
<IBM Db2 Data Management Console installed directory>\samples\DB2LUW\
The
following files are located in the DB2LUW directory:
- pre-create.sql: You can use this script to grant the required authorities and create the
necessary objects if you want a normal user to setup repository.
- create.sql: You can use this script to manually create the product repository.
- drop.sql: You can use this script to manually drop the product created objects.
- grant.sql: You can use this script to grant privileges on tables and views.
- compress.sql: You can use this script to manually enable static, adaptive or compression
for the repository. By default, the repository has no compression.
- reorg.sq:l: You can use this script to RUNSTATS and REORG the product repository
tables.
- Locate and run the create.sql file, to create the repository database objects.
Note: It is
recommended to create the table space TS4CONSOLE with a page size of 32 KB.
- Log into IBM
Db2 Data Management Console.
- Click Administration and go to
.
- In the Repository page, enter the connection parameters for your
repository database, along with the credentials of the repository database owner (for example: TOM).
- Click Save.