Setting up a Db2 database
The IBM® Engineering Lifecycle Management products support IBM Db2 Enterprise Server Edition. For platforms that do not support Enterprise Server Edition, you can use IBM Db2 Workgroup Server Edition. You can obtain a trial download of one these Db2 editions or the free IBM Db2 Express Server edition for deployments of 50 developers or fewer from ibm.com®.
Before you begin
These instructions do not apply to the parts that are being installed or configured on the IBM i or z/OS® operating systems. On IBM i, the Db2 for i database is configured automatically. For z/OS, see Setting up a Db2 database on a z/OS system.
- If you are using Db2 pureScale® for workload balancing, additional settings are required. To enable this feature in WebSphere® Application Server, see Database transfer: Enable the Db2 pureScale load balancing feature. To learn more about Db2 pureScale®, see Configuration of Db2 on Linux, UNIX, and Windows systems workload balancing support for Java clients.
- You have the correct user password. In the UNIX systems, get the password for the Db2 instance owner, which is typically the db2inst1 user.
- You have reviewed the Db2 documentation to verify that your system meets the requirements and is configured correctly.
- A supported version of Db2 is installed and running on a computer to be used as the database server. This computer can be a different one from the one that the Jazz Team Server runs on. For a list of supported versions of Db2, see Hardware and software requirements.
- The user in the teamserver.properties file has system administrator
authority over the database. For information about preparing a Db2 database with only DBADM authority, see this wiki
page.Learn more about Db2 commands: On Linux®, to get system administrator authority on the Db2 database, use the
sudo
command to get thedb2inst1
Db2 user and run the bash command, wheredb2inst1
is the default user. You can use the following commands to check and maintain your database:db2start
: Starts Db2 (on UNIX, the instance owner must run this command).db2stop
: Stops Db2.db2sysc process
: Checks whether Db2 processes are running. For average database use, you must have a minimum of 2 GB RAM available for Db2 processes. In a production environment, consider installing more RAM.reorg indexes/table
: Reorganizes all indexes that are defined on a table by rebuilding the index data into unfragmented, physically contiguous pages. The table option reorganizes a table by reconstructing the rows to eliminate fragmented data and by compacting information.runstats
: Updates statistics about the physical characteristics of a table and the associated indexes. These characteristics include the number of records, the number of pages, and the average record length. The optimizer uses these statistics when determining access paths to the data. Call this utility when a table has had many updates or after reorganizing a table.db2 backup
: Backs up your database. When the command is complete, you have a new backup image that is located in the path or the directory from which the command was issued.
reorg
and runstats
This is a normal database
administration task to be completed by a DBA. Whenever a large amount of data is added to a
database, a reorg
needs to be run and statistics (runstats
) needs
to be executed against the database tables. Running these commands (in Db2) ensures optimal performance to be realized when accessing the database. Refer to
other supported DBMS (such as Oracle and SQL Server) user manuals for equivalent
commands.
Run the following commands in the Db2 Command Window. You can open the Command window from the application Start menu under the Db2 Command Line Tools menu. To connect to a remote server, you can use Telnet or SSH. On Unix systems, ensure that you are connected as the db2inst1 user by running the su db2inst1 command.
Procedure
Setting up a Jazz Authorization Server Db2 database
Jazz Authorization Server is configured to use the default Apache Derby database, but you might want to use an enterprise database such as Db2 in your Jazz Authorization Server environment.