By following these procedures, you will have the information you need to get started with IBM® Rational® ClearQuest®. The information does not cover technicalities and nuances of using IBM® DB2® as a database management system other than to tell you how to install and configure it with two empty databases.
If you have experience installing DB2 on Microsoft® Windows® based servers, you might find that installing and configuring it on UNIX® operating systems is somewhat challenging. After you use these steps to install DB2 on UNIX, you might also use what you learn in this scenario as a supplement for installing other tools for the first time on UNIX operating systems.
Prepare the operating system for installation
In Rational ClearQuest versions 7.1.2 and higher, DB2 (Restricted Enterprise Edition) is included, which means if you want to use DB2 as the backend database for your change and configuration environment, you do not have to purchase separate licenses. For more information about support and prerequisites for both tools, see the resources section of this article.
To install DB2, you need three unique user IDs and corresponding groups to administer the DB2 instance and set up the application. Create these IDs on the operating system of the machine that is your database server. To choose ID names, consider the following example: Use "db2inst" for the instance owner ID, "db2fenc" for the fenced user ID, "dasusr" for the DB2 Administration Server (DAS) user ID.
You must also create 3 different groups to correspond to each ID. To create the groups, log in as root and run the following commands. Note that the IDs and groups in these commands are examples. You can use naming conventions that appropriate for your project or organization.
> groupadd -g 500 db2grp
> groupadd -g 501 db2fgrp
> groupadd -g 502 dasadm
> useradd -u 100 -g db2grp -d /home/db2inst1 -s /bin/sh -p db2inst db2inst
> useradd -u 101 -g db2fgrp -d /home/db2fenc1 -s /bin/sh -p db2fenc db2fenc
> useradd -u 102 -g dasadm -d /home/dasusr1 -s /bin/sh -p dasusr dasus
After you create the user IDs and groups, you must set the passwords for each ID and create their respective home directories. You might need help from your system administration team to make these changes.
To reset the passwords, you must run the "passwd" command. To change the password for the db2inst ID:
- Log on as the root user.
- Enter the following command:
passwd db2inst - Repeat these steps to set up the passwords for the remaining two user accounts, "db2fenc" and "dasusr".
To create home directories:
- Log on as the root user.
- Enter the following commands:
- > mkdir –p /home/db2inst
- > chmod 755 /home/db2inst
- chown db2inst:db2grp /home/db2inst
- Repeat these steps to create directories for the "db2fenc" and "dasusr" IDs.
Since the default installation location for DB2 is the /opt directory, make sure you have enough space to install DB2. Start by allocating 5 GB of space for the /opt directory on your database server.
To install DB2 on UNIX operating systems, you must be logged in as the root user. Copy the DB2 installer to the machine that is your database server.
Run the db2_install script to start the DB2 installation. The utility are available in the /root/desktop/mnt directory. This directory might be different according to your environment.
Figure 1. Start the DB2 installation
The script pauses for you to enter the installation location. If you want to use the default installation location, /opt/ibm/db2/V9.5, you can choose "no" as shown in the following figure.
Figure 2. Enter the installation location for DB2
In figure 2, we chose WSE as the installation type since those are the files that we used for installation. If you use the Enterprise Installation CD to install DB2, ESE will be available as one of the options.
After you complete the installation successfully, the following output is displayed:
Figure 3. Completed DB2 installation
Now you must create the DB2 instance and set some necessary parameters.
Because it is a relational database management system, you must set certain kernel parameters to work with the operating system. To see the kernel parameters requirements run the db2osconf command as the root user to show the current value of required kernel parameters and their expected value.
The output is similar to what you see in figure 4.
Figure 4. Output from the db2osconf command
After you install DB2 successfully and set the kernel parameters, you must create the DB2 instance for the databases in your change and configuration management tool. Use the utility db2icrt to create the instance. Log on with the instance user ID that you previously created.
The db2icrt utility is available in the installation directory. If you used the default installation directory, then the path is /opt/ibm/db2/V9.5/instance
Figure 5. Creating the DB2 instance
After you create the instance, log in as the owner (For example "db2inst"), and then perform following tasks:
- Set the "SVCENAME" parameter, which determines the port used for the DB2 database manager service.
In figure 6, we used port 40000 for the database manager service which is the default port. If you want to use another port, change it here.
Figure 6. Updating the port information
- Set the default communication to TCP/IP.
Figure 7. Setting up the DB2 communication protocol
- Restart the database manager.
NOTE: The database manager must be restarted while being logged on as the instance owner. If you are logged on as the root user, you will not be able to restart the database manager instance.
Figure 8. Restarting DB2
In the change and configuration management tool, you must create two repositories, a schema repository and a user database; therefore, you must create two empty databases in your DB2 instance.
Figure 9. Creating an empty database in DB2
Log on as the instance owner to the database server where DB2 is installed, and run the following commands:
- Connect to the database by running the connect command.
Figure 10. Connecting to the databases
- Create the buffer pool and tablespace for the database.
Figure 11. Creating the buffer pool
Figure 12. Creating the tablespace
Repeat these steps to create a second empty database.
When you have your two empty databases in DB2, you can then create the schema repository and user databases in Rational ClearQuest.
Test the connection between the database and the client
Before you create the schema repository, validate the connection to the database instance by using the pdsql utility available in Rational ClearQuest.
> pdsql -v db2 –s <database server ip / hostname> -db <database-name> -u db2inst –p db2inst
If this command runs successfully, it means the database is accessible from the change and configuration management client where you are creating the schema repository.
When you create the schema repository, choose "DB2" as the database vendor and "db2inst" as the instance owner. For information about how to create the schema repository and user database, see the resources section of this article.
In this article, you learned how to install DB2 through the command line. You also learned how to create a DB2 instance with empty databases and configure them to use with Rational ClearQuest. Finally, you learned how to test the connection between the database and the client machine by using the pdsql utility.
Learn
- Review this technote for more details about supported versions of Rational
ClearQuest.
- See platform-specific prerequisites for DB2 in the
system requirements.
- Article: Configuring
ClearQuest to use DB2 as your backend RDBMS
- Visit the Rational software area on
developerWorks for technical resources and best practices for Rational
Software Delivery Platform products.
- Stay current with developerWorks technical events and webcasts focused on a variety of IBM
products and IT industry topics.
- Attend a free developerWorks Live! briefing to get up-to-speed quickly on IBM products and tools, as well as IT industry trends.
- Watch developerWorks on-demand demos, ranging from product installation and setup demos for beginners to advanced functionality for experienced developers.
- Improve your skills. Check the Rational training and
certification catalog, which includes many types of courses on a wide range
of topics. You can take some of them anywhere, any time, and many of the "Getting
Started" ones are free.
Get products and technologies
- Download a free trial
version of Rational software.
- Evaluate other IBM
software in the way that suits you best: Download it for a trial, try it
online, use it in a cloud environment, or spend a few hours in the SOA
Sandbox learning how to implement service-oriented architecture
efficiently.
Discuss
- Join the Rational
software forums to ask questions and participate in discussions.
- Rate or review Rational software. It's quick and easy. Really.
- Share your knowledge and help others who use
Rational software by writing a developerWorks article. Find out what makes a good developerWorks article and how to proceed.
- Follow Rational software on Facebook, Twitter (@ibmrational), and
YouTube, and add your
comments and requests.
- Ask and answer questions and increase your
expertise when you get involved in the Rational
forums, cafés, and wikis.
- Get social about thought leadership. Join the Rational community to share your
Rational software expertise and get connected with your peers.

Vivek Pandey is a certified Rational Software specialist who works at IBM Rational Lab services in India. He has over 7 years of experience in software configuration management; standards and procedures development; software builds and release management; and training and implementation for large projects in banking, financial, and telecommunications industries.




