By default, the DB2® server is installed with the Performance Management server. If you are already running DB2 version 10.5 fix pack 5, fix pack 6, or fix pack 9 on an external system,
you can choose to use this existing DB2 server for
the databases that are required by the Performance Management server
instead of installing the default DB2 server. If
you plan to use version 10.5 fix pack 9, after you install the Performance Management server, apply interim fix 11 or later to the Performance Management server. Interim fixes for the Performance Management server version 8.1.3 are available to download from
IBM Fix
Central.
Before you begin
If you are using a virus scan program (such as
McAfee Virus Scan for Linux or Sophos), you must configure the virus scan program to exclude all DB2
database files; including storage groups, table spaces, and buffer pools. Configure the virus scan
program before you create the Performance Management
databases.
You might want to connect to an external
DB2 server to adhere to your organization's database server
administration policies. Connecting to a remote
DB2 server also reduces the load on the
Performance Management server, which improves performance. Consider a remote
DB2 setup when the necessary disk I/O performance cannot be
achieved on the hardware that is allocated for your
Performance Management server.
For information about sizing your servers,
see the System requirements. Use the information to
estimate the amount of disk I/O to expect based on your environment size. A low latency network
connection from the Performance Management server to the remote DB2 server is also required. Keep ping times in the range of 1 ms
or less.
Check that the cron service is running on the DB2 server. The cron service is used to schedule Datamart
database aggregation and pruning jobs.
About this task
Complete the following steps on two systems, the system where you are installing the Performance Management server and an external system where the remote DB2 server is installed.
The IBM Data Server Client is installed on the same system as the Performance Management server. It manages applications on the existing DB2 databases. The DATAMART, SCR32, and WAREHOUS databases are created on the external system. These databases are required by the Performance Management server. Normally, they are created during the Performance Management server installation when the default DB2 server is installed. However, you must create them when you are connecting to an external DB2 server.
Procedure
- On the system where you are installing the Performance Management server, complete the following steps to copy the
database scripts from the Performance Management server installation
image to the external system. You will use these scripts later in this procedure to create the
DATAMART, SCR32, and WAREHOUS databases on the external system.
- Download the Performance Management server installation image.
For detailed information, see the Download instructions
topic.
- Extract the server installation files as described in step 3 of Downloading and installing the server.
- Copy the following scripts to the external system:
/installation_media/files/sql/create/create_tdw_db.sql
/installation_media/files/sql/create/create_scr_db.sql
/installation_media/files/sql/create/create_datamart_db.sql
/installation_media/files/sql/update/update_tdw_performance.sql
/installation_media/packages/SCR/setup-dbconfig-linux_64.bin1
where
installation_media is the directory where the Performance Management server installation files are located.
- On the external system, complete the following steps to create the databases and setup the remote DB2 server on this system:
- Verify that the Advanced Enterprise Server Edition (AESE) license is installed by entering the following command:
db2licm -l
For detailed information, see the topic in the DB2
IBM Knowledge Center.
- Verify that DB2 Version 10.5 fix pack
5 or fix pack 6 is installed by entering the following command: db2licm - License management tool
command
db2level
For detailed information, see the
Identifying the version and service level of your product topic in the DB2
IBM Knowledge Center.
- Create the db2apm user, add the db2apm user to the db2iadm1 group, and create the database instance by entering the following commands:
useradd -g db2iadm1 -m db2apm
/opt/ibm/db2/V10.5/instance/db2icrt -u db2fenc1 db2apm
For detailed information, see the Default users and passwords topic.
- Create the itmuser user and add the itmuser user to the dasadm1 group by entering the following command:
useradd -g dasadm1 -m itmuser
- As the root user, set the passwords for the
db2apm and itmuser accounts by entering the following
commands:
passwd db2apm
passwd itmuser
Record the passwords somewhere because you need
these values when you start the Performance Management server
installation.
- In a text editor, open the /etc/services file and add a service name and
the port number for the db2apm instance.
Example:
db2c_db2apm port_number/tcp
Where
port_number is the port number that you want the db2apm instance
to listen on. Record the port number values somewhere because you need these values when you start
the Performance Management server installation.
- Set up the db2apm instance environment by entering the following
command:
. /home/db2apm/sqllib/db2profile
- Log in to the db2apm user account. Example:
su - db2apm
- Update the DB2 configuration with the service name by entering the following commands:
db2 update database manager configuration using svcename db2c_db2apm
db2stop
db2start
- Turn on TCP/IP communications by entering the following commands:
db2set DB2COMM=tcpip
db2stop
db2start
- Enter the following command to verify that the WAREHOUS, SCR32 and DATAMART databases do not
exist:
db2 list db directory
If any of the databases exist, remove each with
the following command:db2 drop db database_name
where
database_name is the name of the database.
- Create the DATAMART, SCR32, and WAREHOUS databases by starting the following scripts:
db2 -vf /path/create_tdw_db.sql
db2 -vf /path/create_scr_db.sql
db2 -vf /path/create_datamart_db.sql
db2 -vf /path/update_tdw_performance.sql
where
path is the path and directory where you stored the scripts after you copied them
from the Performance Management server.Note: These scripts create the databases in the home directory of the db2apm
user.
- Some additional steps are required for the SCR32 database. Run the script
setup_dbconfig-linux_64.bin to complete these steps.
/path/setup-dbconfig-linux_64.bin -i console
Follow the console prompts:- When you are prompted to choose a locale, enter 2 to select English.
- Enter 1 to accept the license agreement.
- Enter the absolute path to the installation folder that you plan to use for
the setup-dbconfig installation or press Enter to accept the default path. The
default path is /opt/IBM/tivoli/tbsmdb. If you accept the default, you might
have to create the directory and grant the user db2apm write permission to the
directory before the installer can continue. This path is not the location of the database.
- Enter 1 to select IBM SmartCloud Application Performance
Management(APM) as the product that uses the database.
- Enter 1 to select Simple as the type of installation to
run.
- Enter 1 to instruct the installer to create the database schema,
including the tables, table spaces, and views.
- Enter the following database configuration details when you are
prompted:
Database Name (maximum 8 characters) (DEFAULT: SCR32): SCR32
Database Hostname or IP Address(DEFAULT:): host_name_or_IP_address
Port (DEFAULT: 50000): port
Database User ID: database_user_ID
Database password: database_password
Confirm password: database_password
Database Path (Default: <default>): default_path
where
- port
- The port number that you specified in step 2e.
- database_user_id
- The user ID is usually itmuser, although db2apm can be used.
- default_path
- The file system where the database is written. The default is the user's home directory. If you
modified the scripts in step 2k to
use a different path, you must specify the same file system in the default_path.
- At the prompt Does the specified user have SYSCTRL or SYSADM
authority?, enter 2 "No" if itmuser was specified
or 1 "Yes" if db2apm was specified.
- Enter 2 to specify not to encrypt the database.
- If the database user you specified did not have SYSCTRL or SYSADM authority,
then enter a database user that has this authority. Specify db2apm.
- Enter the following command to enable the DB2 scheduler that Datamart uses
for aggregation and pruning.
db2set DB2_ATS_ENABLE=YES
For detailed information, see the db2set - DB2 profile registry command
topic in the DB2
IBM Knowledge Center.
- Enter the following command as the db2apm user for each database to adjust the
buffer pool and transaction log after you determine the size of your environment.
db2 connect to WAREHOUS
db2 alter bufferpool IBMDEFAULTBP IMMEDIATE size WAREHOUS_PAGE_COUNT
db2 disconnect WAREHOUS
db2 connect to DATAMART
db2 alter bufferpool IBMDEFAULTBP IMMEDIATE size DATAMART_PAGE_COUNT
db2 disconnect DATAMART
db2 connect to SCR32
db2 UPDATE DATABASE CONFIGURATION FOR SCR32 USING LOGSECOND 25
db2 alter bufferpool IBMDEFAULTBP IMMEDIATE size 5000
db2 alter bufferpool TBSMCFG16KBP IMMEDIATE size 1000
db2 alter bufferpool TBSM4KBP IMMEDIATE size 1000
db2 alter bufferpool TBSM32KBP IMMEDIATE size 1000
db2 alter bufferpool TBSMSCR16KBP IMMEDIATE size SCR32_PAGE_COUNT
db2 disconnect SCR32
where:WAREHOUS_PAGE_COUNT
is the buffer pool page count (8 K page sizes): 50000 for extra small; 75000 for small; 100000 for
medium; or 100000 for large.
DATAMART_PAGE_COUNT is the buffer pool page
count (8 K page sizes): 50000 for extra small; 100000 for small; 200000 for medium; or 300000 for
large.
SCR32_PAGE_COUNT is the buffer pool page count
(16 K page sizes): 10000 for extra small, 15000 for small, 30000 for medium, and 30000 for large.
Estimate the size of your environment (extra small, small, medium, or
large) from the Performance Management server requirements table in
Performance Management server hardware requirements based on system configuration.
- As the root user, install the IBM Data Server Client on the system where you plan to install the Performance Management server.
- Enter the following commands to create the db2apm user and add the db2apm user to the db2iadm1 group.
groupadd db2iadm1
useradd -g db2iadm1 -m db2apm
- Enter the following commands to create the db2fenc1 user and add the db2fenc1 user to the db2fadm1 group.
groupadd db2fadm1
useradd -g db2fadm1 -m db2fenc1
- Download the IBM Data Server Client (DB2 Version 10.5 fix pack 4) from this location: http://www-01.ibm.com/support/docview.wss?uid=swg24038261 and extract the
file.
- From the directory where the IBM Data
Server Client package was extracted, start the following script:
./db2setup
To run the script db2setup, you must set the
DISPLAY environment variable to establish a connection to an X11 server.
- After the DB2 Launchpad opens, select Install a Product. Select the client that you want to install and follow the prompts in the DB2 Setup wizard.
- Accept the license agreement.
- Click Typical as the installation type.
- In the Setup a DB2 instance window, select Create a DB2 instance.
- Click Existing User and enter db2apm for the user name; alternatively, you can enter the following command from the command line after the installation finishes.
/opt/ibm/db2/V10.5/instance/db2icrt -u db2fenc1 db2apm
- Click Next and Finish.
What to do next
Install the
Performance Management server. Start from step 4 in
Downloading and installing the server.