- Log in to the DB2 server
system as a user with sufficient database privileges.
- Ensure that the user for the JCR Database User
has been created, granted appropriate privileges, and has a password assigned
to it. If the user has not been created, refer to the Creating users topic
for information on how to create users.
- Initialize a DB2 command
environment by opening a command prompt and typing su - db2inst1,
where db2inst1 is the database user.
The
prompt changes to $. In this mode, you must type db2 at
the beginning of each command and use double quotation marks ("") around the
entire command. For example:
db2 "CREATE REGULAR TABLESPACE SMS PAGESIZE 4 K MANAGED BY SYSTEM USING ('sms') BUFFERPOOL SMSPOOL"
Note: If
you are using the Command Lind Processor (refer to your DB2 documentation
for details), the command prompt is db2=>. In
this mode, commands can be entered without the db2 prefix or the double
quotation marks. However, the following steps assume you are not using the
CLP and are entering commands from the $ prompt.
- Run the following commands on the DB2 server
system to configure the DB2 database
instance:
| Option |
Description |
| DB2 Version
8 |
db2set DB2_RR_TO_RS=YES
db2set DB2_EVALUNCOMMITTED=YES
db2set DB2_INLIST_TO_NLJN=YES
db2 "UPDATE DBM CFG USING query_heap_sz 32768"
db2 "UPDATE DBM CFG USING maxagents 500"
db2 "UPDATE DBM CFG USING sheapthres 50000"
|
| DB2 Version
9 |
db2set DB2_RR_TO_RS=YES
db2set DB2_EVALUNCOMMITTED=YES
db2set DB2_INLIST_TO_NLJN=YES
db2 "UPDATE DBM CFG USING query_heap_sz 32768"
db2 "UPDATE DBM CFG USING maxagents 500"
db2 "UPDATE DBM CFG USING sheapthres 0"
|
- Run the following commands on the DB2 server
system to create the necessary databases:
Notes: - Replace dbname with the actual name of the database.
Run the commands and each time replace dbname with the
actual values for release, community, customization, jcrdb,
fdbkdb, and lmdb.
db2 "CREATE DB dbname using codeset UTF-8 territory us PAGESIZE 8192"
db2 "UPDATE DB CFG FOR dbname USING applheapsz 4096"
db2 "UPDATE DB CFG FOR dbname USING app_ctl_heap_sz 1024"
db2 "UPDATE DB CFG FOR dbname USING stmtheap 16384"
db2 "UPDATE DB CFG FOR dbname USING dbheap 2400"
db2 "UPDATE DB CFG FOR dbname USING locklist 1000"
db2 "UPDATE DB CFG FOR dbname USING logfilsiz 4000"
db2 "UPDATE DB CFG FOR dbname USING logprimary 12"
db2 "UPDATE DB CFG FOR dbname USING logsecond 20"
db2 "UPDATE DB CFG FOR dbname USING logbufsz 32"
db2 "UPDATE DB CFG FOR dbname USING avg_appls 5"
db2 "UPDATE DB CFG FOR dbname USING locktimeout 30"
db2 "UPDATE DB CFG FOR dbname using AUTO_MAINT off"
- On the DB2 server
system, run the following commands. This step is only required for the IBM Java Content
Repository database (jcrdb).
db2 "CONNECT TO jcrdb USER jcr USING dbpassword"
db2 "CREATE BUFFERPOOL ICMLSFREQBP4 SIZE 1000 PAGESIZE 4 K"
db2 "CREATE BUFFERPOOL ICMLSVOLATILEBP4 SIZE 8000 PAGESIZE 4 K"
db2 "CREATE BUFFERPOOL ICMLSMAINBP32 SIZE 8000 PAGESIZE 32 K"
db2 "CREATE BUFFERPOOL CMBMAIN4 SIZE 1000 PAGESIZE 4 K"
db2 "CREATE REGULAR TABLESPACE ICMLFQ32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('ICMLFQ32') BUFFERPOOL ICMLSMAINBP32"
db2 "CREATE REGULAR TABLESPACE ICMLNF32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('ICMLNF32') BUFFERPOOL ICMLSMAINBP32"
db2 "CREATE REGULAR TABLESPACE ICMVFQ04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('ICMVFQ04') BUFFERPOOL ICMLSVOLATILEBP4"
db2 "CREATE REGULAR TABLESPACE ICMSFQ04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('ICMSFQ04') BUFFERPOOL ICMLSFREQBP4"
db2 "CREATE REGULAR TABLESPACE CMBINV04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('CMBINV04') BUFFERPOOL CMBMAIN4"
db2 "CREATE SYSTEM TEMPORARY TABLESPACE ICMLSSYSTSPACE32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('icmlssystspace32') BUFFERPOOL ICMLSMAINBP32"
db2 "CREATE SYSTEM TEMPORARY TABLESPACE ICMLSSYSTSPACE4 PAGESIZE 4 K MANAGED BY SYSTEM USING ('icmlssystspace4') BUFFERPOOL ICMLSVOLATILEBP4"
db2 "DISCONNECT jcrdb"
db2 "TERMINATE"
- On the DB2 server
system, check the services file. If it does not specify DB2 connection
and interrupt service ports, specify the ports for your operating system:
Use a text editor to open the file /etc/services and
add the following text (where db2inst1 is the name of the DB2 instance ID on the system): db2c_db2inst1
50000/tcp # DB2 connection service port db2i_db2inst1 50001/tcp # DB2 interrupt
service port
- For JDBC Type
2 connections only: On the DB2 Client
system, use
a text editor to open the /etc/services file. If it does
not specify the DB2 connection
service port, add the following text to specify the port for the remote DB2 instance: db2c_db2inst1 50000/tcp
# DB2 connection service port where db2inst1 is
the name of the DB2 instance
ID on the system. The connection service port on the DB2 Client system, WebSphere
Portal server, must match the
connection service port on the DB2 server.
The ports should match by number but not necessarily by name.
- On the DB2 server
system, set DB2COMM to TCP/IP by using the db2set command: db2set
DB2COMM=TCPIP
- Set up the correct service name by entering the
following command on the DB2 server
system: db2 "UPDATE DBM CFG USING svcename svce_name" where svce_name is
the connection service port name that is specified in step 8.
- For JDBC Type 2
connections only: On the DB2 Client
system, set
DB2COMM to TCP/IP by using the db2set command db2set DB2COMM=tcpip.
- For
JDBC Type 2 connections only: Catalog the TCP/IP node with the IP address
of the remote database server on the DB2 Client
system: db2 "catalog tcpip node remote_db_node_alias remote database_server_node server connection_service_port" where:
- remote_db_node_alias is the alias name of the database
server that you are defining for the WebSphere
Application Server node
name. The alias name can contain one to eight characters.
- database_server_node is the fully qualified host name
of your database server system.
- connection_service_port is the name of the DB2 connection
service port that you specified in the /etc/services file
on the database server system in step 8.
- For JDBC Type 2 connections
only, catalog the WebSphere
Portal, JCR,
Feedback and LikeMinds databases on the DB2 Client
system, where:
- remote_db_name_domain, is the cataloged name of the
databases on the server system for each domain.
- domain_alias_name, is the database alias names that
you are defining.
- remote_db_node_alias is the name that was used previously
when you cataloged the TCP/IP node in the previous step.
The alias for each database must be different from the actual database
name, and can only contain up to eight characters.db2 "catalog db remote_db_name_release as release_alias_name at node remote_db_node_alias"
db2 "catalog db remote_db_name_community as comm_alias_name at node remote_db_node_alias"
db2 "catalog db remote_db_name_customization as cust_alias_name at node remote_db_node_alias"
db2 "catalog db remote_db_name_fdbkdb as fdbkdb_alias_name at node remote_db_node_alias"
db2 "catalog db remote_db_name_lmdb as lmdb_alias_name at node remote_db_node_alias"
db2 "catalog db remote_db_name_jcrdb as jcrdb_alias_name at node remote_db_node_alias"
- For JDBC Type 2
connections only: Log out of the DB2 Client
system by
entering db2 "quit".
- For JDBC Type 2 connections
only, on the DB2 client
system, test your remote connection by issuing the following command in the DB2 command window: db2
"connect to alias_name user username using password",
where alias_name is the alias name that you defined in
step 13 and username is the database user.
- Restart your database server.