General Page
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
Attribute name | Attribute value |
---|---|
driver | oracle.jdbc.OracleDriver |
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
- Confirm that the database exists and is configured
- 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.
- On the Terminal tab, run the following commands:
su – db2inst1
db2 connect to BLUDB
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]$
- Configure an LDAP user.
- 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.
- 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. - 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
- 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
-
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>
- 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.
- Verify that the LDAP user can connect to the database. Run the following commands in the Db2 command line environment.
- Run the following command to login to the Db2 pod:
oc rsh db2wh-1589293563350-db2u-0 /bin/bash
- Run the following command to verify that the new LDAP user exists. Replace the username variable with the LDAP username:
id <username>
- Run the following command to log into the Db2 database:
su - db2inst
- 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>
- Run the following command to login to the Db2 pod:
- Prepare the database for maxinst.
- Run the following command to connect to the LDAP Db2 pod:
oc rsh db2wh-1589293563350-db2u-0 /bin/bash
- Run the following command to change the user to the LDAP user. Replace the username variable with the LDAP username:
su - <username>
- Run the following command to connect to the database:
db2 connect to bludb
- 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
- Run the following command to create the buffer pool:
db2 CREATE BUFFERPOOL MAXBUFPOOL IMMEDIATE SIZE 4096 AUTOMATIC PAGESIZE 32 K
- 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>
-
Run the following command to create the schema. Replace the username variable with the LDAP username.
db2 create schema maximo authorization <username>
-
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>
-
Run the following command to break the database connection:
db2 connect reset
- Run the following command to connect to the LDAP Db2 pod:
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:
- Run the following command to set up the command line environment:
db2cmd
- 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
-
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
-
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
- 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
- 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
- Run the following command to stop the database:
db2stop force
- Run the following command to start the database:
db2start
- Run the following command to reconnect to the database:
db2 connect to 'maxdb76'
- 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
- Run the following command to create the schema:
db2 create schema maximo authorization
- 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
- Run the following command to break the database connection:
db2 connect reset
Was this topic helpful?
Document Information
Modified date:
09 November 2020
UID
ibm16353455