IBM Support

Configuring the database for Maximo Health

General Page

Before you deploy IBM® Maximo® Health, a database must be installed and deployed. You can reuse and configure the IBM Db2® Warehouse instance on IBM Cloud Pak for Data that is provided with IBM Maximo® Application Suite or you can configure a new database. Maximo Health supports IBM Db2 databases, Microsoft™ SQL Server, and Oracle Database.
If you are configuring a Db2 database, either the database on Cloud Pak fo Data or another database, certain settings must be completed when that database is initially set up. For more information, see the Maximo Health, Maximo Predict: Application database section of the Configure dependencies article.
Configuring Oracle Database

For information about installing and deploying Oracle Database, review the Oracle Database product documentation.

To configure the database for Maximo Health, you must create tablespaces, create a database user, and configure database settings. The following text is an example of the commands that you must run. For example, maximo is your database username. You can run similar commands by using a SQL query tool.

ALTER SYSTEM SET OPEN_CURSORS = 1000;
ALTER SYSTEM SET NLS_LENGTH_SEMANTICS='CHAR' scope=both;
ALTER SYSTEM SET cursor_sharing='FORCE';
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
CREATE OR REPLACE DIRECTORY dump AS '/home/oracle';
Create tablespace maxdata datafile '/opt/oradata/orcl/maxdata.dbf' size 100M autoextend on;
Create tablespace maxindx datafile '/opt/oradata/orcl/maxindx.dbf' size 100M autoextend on;
create temporary tablespace maxtemp tempfile '/opt/oradata/orcl/maxtemp.dbf' size 100M autoextend on maxsize unlimited;
create user maximo identified by maximo default tablespace maxdata temporary tablespace maxtemp;
grant connect to maximo;
grant create job to maximo;
grant create trigger to maximo;
grant create session to maximo;
grant create sequence to maximo;
grant create synonym to maximo;
grant create table to maximo;
grant create view to maximo;
grant create procedure to maximo;
grant alter session to maximo;
grant select any dictionary to maximo;
grant execute on ctxsys.ctx_ddl to maximo;
alter user maximo quota unlimited on maxdata;
alter user maximo quota unlimited on maxindx;
commit;
exit
Note: After the database is configured and you complete the Maximo Health deployment, in addition to the steps and JDBC attributes that are described in the Deploy Health article, if you are using SSL, you must specify the following attribute in the Optional attribute JDBC name table:
Additional attributes for Oracle Database
Attribute name Attribute value
driver oracle.jdbc.OracleDriver
Configuring Microsoft SQL Server

For more information about configuring a SQL Server database, review the SQL Server product documentation.

To configure the database for Maximo Health, you must create tablespaces, create a database user, and configure database settings. The following text is an example of the commands that you must run. For example, maximo is your database username and maxdb76 is the name of the database. You can run similar commands by using a SQL query tool.

CREATE DATABASE maxdb76 ON (NAME = 'maxdata', FILENAME = '/var/opt/mssql/data/maxdata.mdf', SIZE = 500, FILEGROWTH = 10%) LOG ON (NAME = 'MAXIMO_Log', FILENAME = '/var/opt/mssql/data/maxdb76_log.ldf' , SIZE = 1, FILEGROWTH = 10%) COLLATE $(COLLATE)
GO
USE maxdb76;
GO
sp_addlogin maximo,Maximo76;
GO
sp_changedbowner maximo;
GO
sp_addsrvrolemember maximo, securityadmin;
GO
Note: After the database is configured and you complete the Maximo Health deployment, in addition to the steps and JDBC attributes described in the Deploy Health article, ensure that you specify your schema attribute if the value for the schema is not maximo. For example, if you are using the default SQL Server schema, specify the schema attribute with the dbo value. 

Configuring Db2 Warehouse on Cloud Pak for Data
The Db2 Warehouse instance on Cloud Pak for Data is configured and deployed as part of the IBM Maximo® Monitor deployment. However, you must complete the following tasks to configure the database for Maximo Health. BLUBD is the default name of the database. If your database name is not BLUBD, ensure that you specify the correct name in the commands.
  1. Confirm that the database exists and is configured
    1. In Red Hat OpenShift Container Platform, open the db2wh – <> – db2u-0 pod. <> is a randomly generate set of numbers. By default, the pod is located in the zen namespace.
    2. On the Terminal tab, run the following commands:
       su – db2inst1
       db2 connect to BLUDB
      If the database is configured, the database connection information is returned. The following text is an example if this information. You  need these values later in the configuration.
      sh-4.2$ su - db2inst1
      Last login: Tue May 26 14:29:55 UTC 2020
      [db2inst1@db2wh-1589293563350-db2u-0- Db2U db2inst1]$ db2 connect to BLUDB
      
      Database Connection Information
      Databaseserver  = DB2/LINUXX8664 11.5.2.0
      QLauthorizationID  = DB2INST1
      Local database alias  = BLUDB
      [db2inst1@db2wh-1589293563350-db2u-0 - Db2U db2inst1]$
  2. Configure an LDAP user.
    1. In Red Hat OpenShift Container Platform, open the db2wh – <> – db2u-ldap pod. <> is a randomly generated set of numbers. By default, the pod is located in the zen namespace.
    2. On the Terminal tab, run the following commands:
      source /opt/ibm/lib/utils.sh
      
      ldapPassword=$(get_ldap_root_password)
      
      echo $(($(ldapsearch -Z -H ldap://localhost:50389/ -D 'cn=bluldap,dc=blustratus,dc=com' -w "$ldapPassword" -b 'dc=blustratus,dc=com' '(objectClass=posixAccount)' | grep uidNumber | cut -d ":" -f 2 | sort -nr | head -n 1)+1)) 

      The LDAP user name is returned.
    3. In LDAP pod directory, create a newuser.ldif file and paste the following content into the file. Replace the username variable with the LDAP username, the user_ID variable with the LDAP user ID, and the grid_number variable with the grid number.
      dn: uid=<username>,ou=People,dc=blustratus,dc=com
      uid: <username>
      cn: <username>
      objectClass: account
      objectClass: posixAccount
      objectClass: top
      uidNumber: <user_ID>
      gidNumber: <grid_number>
      homeDirectory: /mnt/blumeta0/home/<username> 
      
      dn: cn=<bluadmin|bluusers>,ou=Groups,dc=blustratus,dc=com
      changetype: modify                                                                                  
      add: memberuid
      memberuid: <username>
      memberuid: uid=<username>,ou=People,dc=blustratus,dc=com
    4. On the Terminal tab, run the following command to create the LDAP user.
      ldapadd -Z -H ldap://localhost:50389/ -D 'cn=bluldap,dc=blustratus,dc=com' -w "$ldapPassword" -f newuser.ldif
    5. On the Terminal tab, run the following command to set the password for the LDAP user. Replace the username and password variables with the LDAP user name and password.
      ldappasswd -x -Z -H ldap://localhost:50389/ -D "cn=bluldap,dc=blustratus,dc=com" -w "$ldapPassword" -S "uid=<username>,ou=People,dc=blustratus,dc=com" -s <password>
  3. Verify that the LDAP user can connect to the database. Run the following commands in the Db2 command line environment.
    1. Run the following command to login to the Db2 pod:
      oc rsh db2wh-1589293563350-db2u-0 /bin/bash​​​​​​​
    2. ​​​​​​​​​​​​​​​​​​Run the following command to verify that the new LDAP user exists. Replace the username variable with the LDAP username:​​​​​​​
      id <username>
    3. Run the following command to log into the Db2 database:
      su - db2inst
    4. Run the following command to connect to the database as the LDAP user. Replace the username and password variables with the LDAP username and password.​​​​​​​
      db2 connect to bludb user <username> using <password>
  4. Prepare the database for maxinst.
    1. Run the following command to connect to the LDAP Db2 pod:
      oc rsh db2wh-1589293563350-db2u-0 /bin/bash
    2. Run the following command to change the user to the LDAP user. Replace the username variable with the LDAP username: 
      su - <username>
    3. Run the following command to connect to the database: 
      db2 connect to bludb
    4. Run the following commands to configure the database:
      ​db2 update db cfg for bludb using SELF_TUNING_MEM ON
      
      db2 update db cfg for bludb using APPGROUP_MEM_SZ 16384 DEFERRED
      
      db2 update db cfg for bludb using APPLHEAPSZ 2048 AUTOMATIC DEFERRED
      
      db2 update db cfg for bludb using AUTO_MAINT ON DEFERRED
      
      db2 update db cfg for bludb using AUTO_TBL_MAINT ON DEFERRED
      
      db2 update db cfg for bludb using AUTO_RUNSTATS ON DEFERRED
      
      db2 update db cfg for bludb using AUTO_REORG ON DEFERRED
      
      db2 update db cfg for bludb using AUTO_DB_BACKUP ON DEFERRED
      
      db2 update db cfg for bludb using CATALOGCACHE_SZ 800 DEFERRED
      
      db2 update db cfg for bludb using CHNGPGS_THRESH 40 DEFERRED
      
      db2 update db cfg for bludb using DBHEAP AUTOMATIC
      
      db2 update db cfg for bludb using LOCKLIST AUTOMATIC DEFERRED
      
      db2 update db cfg for bludb using LOGBUFSZ 1024 DEFERRED
      
      db2 update db cfg for bludb using LOCKTIMEOUT 300 DEFERRED
      
      db2 update db cfg for bludb using LOGPRIMARY 20 DEFERRED
      
      db2 update db cfg for bludb using LOGSECOND 100 DEFERRED
      
      db2 update db cfg for bludb using LOGFILSIZ 8192 DEFERRED
      
      db2 update db cfg for bludb using SOFTMAX 1000 DEFERRED
      
      db2 update db cfg for bludb using MAXFILOP 61440 DEFERRED
      
      db2 update db cfg for bludb using PCKCACHESZ AUTOMATIC DEFERRED
      
      db2 update db cfg for bludb using STAT_HEAP_SZ AUTOMATIC DEFERRED
      
      db2 update db cfg for bludb using STMTHEAP AUTOMATIC DEFERRED
      
      db2 update db cfg for bludb using UTIL_HEAP_SZ 10000 DEFERRED
      
      db2 update db cfg for bludb using DATABASE_MEMORY AUTOMATIC DEFERRED
      
      db2 update db cfg for bludb using AUTO_STMT_STATS OFF DEFERRED
      
      db2 update db cfg for bludb using STMT_CONC LITERALS DEFERRED
      
      db2 update alert cfg for database on bludb using db.db_backup_req SET THRESHOLDSCHECKED YES
      
      db2 update alert cfg for database on bludb using db.tb_reorg_req SET THRESHOLDSCHECKED YES
      
      db2 update alert cfg for database on bludb using db.tb_runstats_req SET THRESHOLDSCHECKED YES
      
      db2 update dbm cfg using PRIV_MEM_THRESH 32767 DEFERRED
      
      db2 update dbm cfg using KEEPFENCED NO DEFERRED
      
      db2 update dbm cfg using NUMDB 2 DEFERRED
      
      db2 update dbm cfg using RQRIOBLK 65535 DEFERRED
      
      db2 update dbm cfg using HEALTH_MON OFF DEFERRED
      
      db2 update dbm cfg using AGENT_STACK_SZ 1000 DEFERRED
      
      db2 update dbm cfg using MON_HEAP_SZ AUTOMATIC DEFERRED
      
      db2 update db cfg using DDL_CONSTRAINT_DEF Yes
      
      db2set DB2_SKIPINSERTED=ON
      
      db2set DB2_INLIST_TO_NLJN=YES
      
      db2set DB2_MINIMIZE_LISTPREFETCH=Y
      
      db2set DB2_EVALUNCOMMITTED=YES
      
      db2set DB2_FMP_COMM_HEAPSZ=65536
      
      db2set DB2_SKIPDELETED=ON
      
      db2set DB2_USE_ALTERNATE_PAGE_CLEANING=ON
    5. Run the following command to create the buffer pool:
      db2 CREATE BUFFERPOOL MAXBUFPOOL IMMEDIATE SIZE 4096 AUTOMATIC PAGESIZE 32 K
    6. Run the following commands to create the tablespaces. Replace the username variable with the LDAP username.
      db2 CREATE REGULAR TABLESPACE MAXDATA PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE INITIALSIZE 5000 M BUFFERPOOL MAXBUFPOOL
      
      db2 CREATE TEMPORARY TABLESPACE MAXTEMP PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE BUFFERPOOL MAXBUFPOOL
      
      db2 CREATE REGULAR TABLESPACE MAXINDEX PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE INITIALSIZE 5000 M BUFFERPOOL MAXBUFPOOL
      
      db2 GRANT USE OF TABLESPACE MAXDATA TO USER <username>
    7. Run the following command to create the schema. Replace the username variable with the LDAP username. 

      db2 create schema maximo authorization <username> 

    8. Run the following commands to grant authority to the LDAP user. Replace the username variable with the LDAP username. 

      db2 GRANT DBADM,CREATETAB,BINDADD,CONNECT,CREATE_NOT_FENCED_ROUTINE,IMPLICIT_SCHEMA,
      LOAD,CREATE_EXTERNAL_ROUTINE,QUIESCE_CONNECT,SECADM ON DATABASE TO USER <username>
      
      db2 GRANT USE OF TABLESPACE MAXDATA TO USER <username>
      
      db2 GRANT CREATEIN,DROPIN,ALTERIN ON SCHEMA MAXIMO TO USER <username>
    9. Run the following command to break the database connection:

      db2 connect reset

Configuring other Db2 databases 

Before you configure the database, install and deploy it. For installation instructions, review the Db2 product documentation for your database.

The following commands can be used to configure a database that is not the instance of Db2 Warehouse on Cloud Pak for Data, for example, IBM Db2 Advanced databases or an instance of Db2 Warehouse that is not on Cloud Pak for Data. However, the database must be version 11.5 or later. 

In the following commands, maxdb76 is the name of the database. If maxdb76 is not your database name, ensure that you replace all instances of that value with your database name.

Open a command line at the Db2 installation directory and run the following commands:

  1. Run the following command to set up the command line environment:
    db2cmd
  2. Run the following commands to create the Db2 instance. Replace the administrator password variable with the Db2 administrator password.
    db2icrt -s ese -u db2admin,<administrator password> -r 50005,50005 ctginst1
    
    set db2instance=ctginst1
    
    db2start
    
    db2 update dbm config using SVCENAME 50005 DEFERRED
    
    db2stop
    
    db2set DB2COMM=tcpip
    
    db2start
  3. Run the following commands to create the database:

    db2 create db 'maxdb76' ALIAS 'maxdb76' using codeset UTF-8 territory US pagesize 32 K
    
    db2 connect to 'maxdb76'
    
    db2 GRANT DBADM ON DATABASE TO USER db2admin
    
    db2 GRANT SECADM ON DATABASE TO USER db2admin
    
    db2 connect reset
  4. Run the following commands to configure the database: 

    db2 update db cfg for maxdb76 using SELF_TUNING_MEM ON
    
    db2 update db cfg for maxdb76 using APPGROUP_MEM_SZ 16384 DEFERRED
    
    db2 update db cfg for maxdb76 using APPLHEAPSZ 2048 AUTOMATIC DEFERRED
    
    db2 update db cfg for maxdb76 using AUTO_MAINT ON DEFERRED
    
    db2 update db cfg for maxdb76 using AUTO_TBL_MAINT ON DEFERRED
    
    db2 update db cfg for maxdb76 using AUTO_RUNSTATS ON DEFERRED
    
    db2 update db cfg for maxdb76 using AUTO_REORG ON DEFERRED
    
    db2 update db cfg for maxdb76 using AUTO_DB_BACKUP ON DEFERRED
    
    db2 update db cfg for maxdb76 using CATALOGCACHE_SZ 800 DEFERRED
    
    db2 update db cfg for maxdb76 using CHNGPGS_THRESH 40 DEFERRED
    
    db2 update db cfg for maxdb76 using DBHEAP AUTOMATIC
    
    db2 update db cfg for maxdb76 using LOCKLIST AUTOMATIC DEFERRED
    
    db2 update db cfg for maxdb76 using LOGBUFSZ 1024 DEFERRED
    
    db2 update db cfg for maxdb76 using LOCKTIMEOUT 300 DEFERRED
    
    db2 update db cfg for maxdb76 using LOGPRIMARY 20 DEFERRED
    
    db2 update db cfg for maxdb76 using LOGSECOND 100 DEFERRED
    
    db2 update db cfg for maxdb76 using LOGFILSIZ 8192 DEFERRED
    
    db2 update db cfg for maxdb76 using SOFTMAX 1000 DEFERRED
    
  5. Run the following command according to your operating system and bit size. 
    For a 32-bit Microsoft™ Windows™ operating system, run the following command:
    db2 update db cfg for maxdb76 using MAXFILOP 32768 DEFERRED
    
    For a 64-bit Windows™ operating system, run the following command: 
    db2 update db cfg for maxdb76 using MAXFILOP 65335 DEFERRED
    For a 32-bit UNIX™ operating system, run the following command: 
    db2 update db cfg for maxdb76 using MAXFILOP 30720 DEFERRED
    For a 64-bit UNIX™ operating system, run the following command:
    db2 update db cfg for maxdb76 using MAXFILOP 61440 DEFERRED
  6. Run the following commands to continue to configure the database: 
    db2 update db cfg for maxdb76 using PCKCACHESZ AUTOMATIC DEFERRED
    
    db2 update db cfg for maxdb76 using STAT_HEAP_SZ AUTOMATIC DEFERRED
    
    db2 update db cfg for maxdb76 using STMTHEAP AUTOMATIC DEFERRED
    
    db2 update db cfg for maxdb76 using UTIL_HEAP_SZ 10000 DEFERRED
    
    db2 update db cfg for maxdb76 using DATABASE_MEMORY AUTOMATIC DEFERRED
    
    db2 update db cfg for maxdb76 using AUTO_STMT_STATS OFF DEFERRED
    
    db2 update db cfg for maxdb76 using STMT_CONC LITERALS DEFERRED
    
    db2 update alert cfg for database on maxdb76 using db.db_backup_req SET THRESHOLDSCHECKED YES
    
    db2 update alert cfg for database on maxdb76 using db.tb_reorg_req SET THRESHOLDSCHECKED YES
    
    db2 update alert cfg for database on maxdb76 using db.tb_runstats_req SET THRESHOLDSCHECKED YES
    
    db2 update dbm cfg using PRIV_MEM_THRESH 32767 DEFERRED
    
    db2 update dbm cfg using KEEPFENCED NO DEFERRED
    
    db2 update dbm cfg using NUMDB 2 DEFERRED
    
    db2 update dbm cfg using RQRIOBLK 65535 DEFERRED
    
    db2 update dbm cfg using HEALTH_MON OFF DEFERRED
    
    db2 update dbm cfg using AGENT_STACK_SZ 1000 DEFERRED
    
    db2 update dbm cfg using MON_HEAP_SZ AUTOMATIC DEFERRED
    
    db2set DB2_SKIPINSERTED=ON
    
    db2set DB2_INLIST_TO_NLJN=YES
    
    db2set DB2_MINIMIZE_LISTPREFETCH=Y
    
    db2set DB2_EVALUNCOMMITTED=YES
    
    db2set DB2_FMP_COMM_HEAPSZ=65536
    
    db2set DB2_SKIPDELETED=ON
    
    db2set DB2_USE_ALTERNATE_PAGE_CLEANING=ON
    
  7. Run the following command to stop the database:
    db2stop force
  8. Run the following command to start the database: ​​​​​​​
    db2start
  9. Run the following command to reconnect to the database:​​​​​​​
    db2 connect to 'maxdb76'
  10. Run the following commands to create a buffer pool:
    db2 CREATE BUFFERPOOL MAXBUFPOOL IMMEDIATE SIZE 4096 AUTOMATIC PAGESIZE 32 K
    
    db2 CREATE REGULAR TABLESPACE MAXDATA PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE INITIALSIZE 5000 M BUFFERPOOL MAXBUFPOOL
    
    db2 CREATE TEMPORARY TABLESPACE MAXTEMP PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE BUFFERPOOL MAXBUFPOOL
    
    db2 CREATE REGULAR TABLESPACE MAXINDEX PAGESIZE 32 K MANAGED BY AUTOMATIC STORAGE INITIALSIZE 5000 M BUFFERPOOL MAXBUFPOOL
    
    db2 GRANT USE OF TABLESPACE MAXDATA TO USER
  11. Run the following command to create the schema:
    db2 create schema maximo authorization
  12. Run the following commands to grant authority to the database user. In this case, the database user is maximo. 
    db2 GRANT DBADM,CREATETAB,BINDADD,CONNECT,CREATE_NOT_FENCED_ROUTINE,IMPLICIT_SCHEMA,LOAD,CREATE_EXTERNAL_ROUTINE,QUIESCE_CONNECT,SECADM ON DATABASE TO USER MAXIMO
    
    db2 GRANT USE OF TABLESPACE MAXDATA TO USER MAXIMO
    
    db2 GRANT CREATEIN,DROPIN,ALTERIN ON SCHEMA MAXIMO TO USER MAXIMO

    ​​​​
  13. Run the following command to break the database connection:
    db2 connect reset

[{"Line of Business":{"code":"LOB59","label":"Sustainability Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSRHPA","label":"IBM Maximo Application Suite"},"ARM Category":[{"code":"a8m50000000CbLKAA0","label":"General->Misc - Documentation"},{"code":"a8m0z000000cwZDAAY","label":"Maximo Application Suite"},{"code":"a8m0z000000cxN3AAI","label":"Maximo Health"},{"code":"a8m0z000000cxN8AAI","label":"Maximo Predict"}],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.1.0;8.2.0"}]

Document Information

Modified date:
09 November 2020

UID

ibm16353455