DB2 universal database
There are some guidelines to set up DB2 for LN. For installing the DB2 software and creating a DB2 instance, see the IBM documentation or online help. For DB2 database tuning advice, see Infor LN - Performance, Tracing and Tuning Guide for DB2 (B0077 US).
System accounts
DB2 uses Operating System authentication. In case of a 3-Tier setup you can use one of these authentication options:
- Server authentication: the OS users and groups must be created on the database server.
- Client authentication: the OS users and groups must be created on the (Master) Application server.
In case of 2-Tier, use server authentication.
These OS users and groups must be added or modified:
- Create a UNIX group for all LN users; for example infor. The group name must correspond with the DB2 database that is created during the installation of LN. Any user who must have access to the database must be a member of this group. All users that require database administration access must belong to the group db2iadm that was created during the installation of DB2.
- Add the installation user, for example bsp, to the LN application group infor and to the database administration group db2iadm.
- Create a user infor whose name corresponds to the DB2 database group that is created during the installation of LN. You must add this user to the UNIX group, for example infor and to the database administration group db2iadm.
- Modify the user account root/administrator and make the account a member of the group infor. In addition, the user root must be a member of the DB2 related groups created during installation.
Character set
The used collation depends on the DB2 version. When creating the database through the LN Installation Wizard, this setting is used.
Installation | Code set | Territory | Collation (database version dependent) |
---|---|---|---|
Unicode | UTF-8 | en_US | CLDR181_NX (DB2 version V10.1 or later) UCA500R1_NX (DB2 version V9.7 or later) UCA400_NO (DB2 version 9.5) |
DB2 Code page
DB2 can convert characters if the client, the Infor LN DB2 driver, and the RDBMS work with different code pages. The client code page is derived from system settings, for example local.
If conversion errors occur, the
DB2CODEPAGE
variable must be set to the same code page
as used in the database. Specify the
DB2CODEPAGE
in the
$BSE/lib/tabledef6.2 file.
Data storage
The table shows a rough starting value for the size of the DB2 tablespaces. Consider the requirements based on your system sizing for optimal performance.
Tablespace | Type | Initial size |
---|---|---|
Catalog | SMS | Minimal 10 GB free disk space |
Temporary | SMS | Minimal 10 GB free disk space |
Data + Index | DMS | See sizing, minimal 20 GB |
Parameters
Use automatic tuning as much as possible. Consider the requirements based on your system sizing for optimal performance.
Parameter | Recommended value |
---|---|
bufferpool (data) | AUTOMATIC(200000) |
bufferpool (temp) | AUTOMATIC(10000) |
bufferpool (ibmdefaultbp) | AUTOMATIC(25000) |
dbheap | AUTOMATIC(50000) |
logprimary | 6 |
logsecondary | 10 |
logfilsiz | 128000 |
Enable connection pooling, run this command at a db2 command prompt:
db2 => update cli cfg for section Common using MultiConnect
3
If the MultiConnect setting is not set to 3, errors occur.
DB2 shared libraries on UNIX/Linux
Ensure that you create a symbolic link for the correct version of DB2 libraries under /usr/lib. To create this symbolic link, use the db2ln utility.
The db2ln utility creates a symbolic link to /usr/lib/$LIBNAME. Symbolic links to previous versions of DB2 are removed. You can find db2ln in: <DB2INSTALLDIR>/cfg
Run the command as root: <DB2INSTALLDIR>/cfg/db2ln
Links from previous versions of DB2 to the /usr/lib directory are automatically replaced with a link to the newer DB2 version if you run the db2ln command. Check IBM DB2 documentation if you want to re-establish a symbolic ink to a previous version of DB2. You can only establish symbolic links for one DB2 version on a specific system.
In case of multiple DB2 installations on the same system, the shared library environment variable must be set in <BSE>/lib/bse_vars. This environment variable enables you to use the correct libraries with the DB2 version you want to use for the LN installation.
During the installation of the LN software, a dialog box is displayed where you can change the bse_vars file. The name of the variable varies by platform:
- On AIX:
LIBPATH=<DB2INSTALLDIR>/lib
- Other UNIX/Linux
platforms:
LD_LIBRARY_PATH=<DB2INSTALLDIR>/lib
Remote database (3-tier)
To install the database on another server:
- Set these DB2 environment
variables on both the database- and application server:
-
db2set DB2COMM=TCPIP
-
db2set DB2INSTANCE=instance_name
-
- Search for two consecutive
unused TCP/IP port numbers higher than 1024 on both the application and
database server in /etc/services. Use these port numbers for DB2 client/server
communication. Add these lines:
-
name1 port_number1/tcp
-
name2 port_number2/tcp
The name of the first port number is referred to as the service name.
-
-
On the database server, ensure the database manager configuration parameter SVCENAME contains the correct service name:
db2 => update dbm cfg using SVCENAME name1
- Catalog the database on
the (Master) Application Server. Start a db2 command prompt and specify these
commands:
-
db2 => catalog tcpip node NODENAME remote hostname|ip_address server service_name|port_number
-
db2 => catalog database DATABASE as DATABASE at node NODENAME
-
db2 => update dbm cfg using authentication CLIENT
-
db2 => terminate
-