UML软件工程组织

 

 

Configuring ClearQuest to use DB2 as your back-end RDBMS
 
2008-08-15 作者:Forrest Xia 来源:IBM
 
In this article:
As you may know, IBM® Rational® ClearQuest® supports several different relational database management systems (RDBMS) on the back-end. It is important to recognize, though, that different database vendors have various default settings that could influence ClearQuest's configuration and deployment. When the ClearQuest administrator is not familiar with the specific attributes of a particular RDBMS, configuring ClearQuest can become rather time-consuming. If you want to use DB2 as your back-end database, but have limited experience on DB2, this article should serve as a good point of reference.

Introduction

IBM® DB2® is a comprehensive RDBMS product, which IBM® Rational® ClearQuest® fully supports. This article provides a step-by-step configuration guide to give you a clear picture regarding how to configure DB2 as your ClearQuest back-end RDBMS.

For the most common configuration, ClearQuest requires two separate databases: the Schema Repository database and the User database. Therefore, the first step is to create two DB2 databases.

Note: remember to create a new buffer pool with a special setting in your User database to allow the system to read certain types of long ClearQuest records, such as defect records.

Detailed Steps:

Prepare DB2 databases

1. Create a database for the schema repository with the DB2 command line processor (CLP) using the common DB2 database creation syntax:

db2 create db [databasename] using codeset [encodingname] territory [validterritorycode]

Note: The italicized text enclosed in brackets represents variables (which can be replaced with your own values). Also note that the database name cannot be more than eight letters. For details about DB2 database syntax, refer to the DB2 Information Center.

For example:

On Windows 2000, click Start > Run. Type db2cmd and press Enter. Then input the following command at the command prompt:

db2 create db gbsrdb using codeset UTF-8 territory CN

2. Create a database for the User database with DB2 CLP.

For example:

At the command prompt, execute the following command:

db2 create db gbuserdb using codeset UTF-8 territory CN
Figure 1. Commands that create databases with DB2 CLP
Commands that create databases with DB2 CLP

3. Configure the User database to add a new buffer pool, and set the page size to 16K.

  1. To create the special buffer pool, first connect to the database, then execute the following commands:

    db2 connect to gbuserdb user <DB2 Admin Account>
    db2 create bufferpool bp4cq immediate size 250 pagesize 16k

    Figure 2. Create a new buffer pool
    Create a new buffer pool

    The common command syntax to create a buffer pool is as follows:

    db2 create bufferpool [bufferpoolname] immediate size [numberofsize] pagesize [numberofsize]k

  2. Create a new table space that uses the newly-added buffer pool. For example, execute the following command:

    db2 connect to gbuserdb user [DB2 Admin Account]

    db2 create regular tablespace ts4cq pagesize 16k managed by system using ('c:\db\node0001') extentsize 16 overhead 12.67 prefetchsize 16 transferrate 0.18 bufferpool bp4cq dropped table recovery off

    Figure 3. Create a tablespace
    Create a tablespace

Note: You can also create these DB2 objects with the DB2 GUI tool DB2 Control Center, which provides some step-by-step wizards to help you complete these tasks.

Create ClearQuest Schema Repository and User database on ClearQuest server

4. Create a schema repository with the ClearQuest Maintenance Tool.

  1. Click Schema Repository > Create, then input the DB2 database info for the Schema Repository.

    Figure 4. Create a Schema Repository
    Create a Schema Repository

  2. If you want a quick tutorial on some of the features within ClearQuest, you can select Create sample database. In this example, the box is left blank.

    Figure 5. Option to create a sample database
    Option to create a sample database

  3. When you click Finish, you will see a warning. By default, the encoding of input data in the ClearQuest database is ASCII(20217). Simply click OK. For more information, or if you prefer to set the data code page, please refer to Step 5.

    Figure 6. Data code page message
    Data code page message

  4. Confirm that you have successfully created the Schema Repository.

    Figure 7. New Schema Repository information
    New Schema Repository information

5. (Optional) As mentioned in Step 4.3, you can set the proper ClearQuest data code page by following these steps:

Sample command:

  1. List the code page of the Schema and client OS.

    [ClearQuest Installation Directory]>installutil.exe lscodepage -dbset GB18030DefectsDB admin admin

  2. Next, set the code page of the client OS into the Schema.

    [ClearQuest Installation Directory]>installutil.exe setdbcodepagetoplatformcodepage -dbset GB18030DefectsDB admin

  3. Set the code page into ASCII.

    [ClearQuest Installation Directory]>installutil.exe setdbcodepagetoascii -dbset GB18030DefectsDB admin admin

Note: for more detailed information about code page settings, refer to the Rational ClearQuest Administrator's Guide.

6. Create a User database with ClearQuest Designer.

  1. Open ClearQuest Designer. When prompted, don't select any schema to edit. Click Database > New database.

    Figure 8. Create a new database
    Create a new database

  2. Enter a name in the Logical Database Name box, and input a brief description into the Comment box.

    Figure 9. Describe the database
    Describe the database

  3. Specify the DB2 User database.

    Figure 10. Link to the physical database you created previously
    Link to the physical database you created previously

  4. Select a schema to create the User database.

    Figure 11. Associate the database with a schema
    Associate the database with a schema

At this point, you have completed the ClearQuest server settings. You should be able to log on to ClearQuest from the server. To enable ClearQuest client access, you need to complete the following steps on your client machine:

Configure ClearQuest client machine

7. Install DB2 client on your client machine. Next, catalog the Schema Repository database on the client machine and execute the following commands:

db2 catalog tcpip node node1 remote [cqserver_name]
server 50000 remote_instance DB2 system [cqserver_name]
ostype win
db2 catalog database gbsrdb at node node1
db2 catalog database gbuserdb at node node1

For details on how to catalog a DB2 database on the client machine, refer to the DB2 Information Center.

8. Create a connection on the client machine with the ClearQuest Maintenance Tool.

  1. Open the ClearQuest Maintenance Tool, and then click Connection > New.

    Figure 12. Create a connection on the client
    Create a connection on the client

  2. Enter the connection name, and the settings of the Schema Repository, into the DB2 database.

    Figure 13. Enter the database properties
    Enter the database properties

  3. Make sure that the ClearQuest client is configured correctly and properly. If the connection fails, go back through all of the previous steps to check your work. If all the information is input correctly, ClearQuest should function normally.

    Figure 14. Confirmation dialog
    Confirmation dialog

9. Start to use ClearQuest.

Congratulations! If you have successfully reached this point, you are ready to begin using ClearQuest. To log on, just enter your ClearQuest account and password, as shown below:

Figure 15. Logging on
Logging on

Once you've logged on, ClearQuest is ready for use. By combining ClearQuest with DB2 as your back-end RDBMS you now have a powerful, scalable change management solution.

Figure 16. The ClearQuest workspace
The ClearQuest workspace
 

组织简介 | 联系我们 |   Copyright 2002 ®  UML软件工程组织 京ICP备10020922号

京公海网安备110108001071号