0% found this document useful (0 votes)
73 views

Manually Configuring DB2 9

This document outlines the steps to manually configure DB2 9.x, including creating system users, setting up the DB2 environment, creating a database and buffer pool, configuring database parameters, granting privileges to users, and finally creating tables.

Uploaded by

Sheyam Selvaraj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

Manually Configuring DB2 9

This document outlines the steps to manually configure DB2 9.x, including creating system users, setting up the DB2 environment, creating a database and buffer pool, configuring database parameters, granting privileges to users, and finally creating tables.

Uploaded by

Sheyam Selvaraj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Manually configuring DB2 9.

x
Procedure
1. Log in to the system as a user that has administrative permissions on the system.
2. Create system users if they do not exist on the system.
Windows
db2admin
maximo
3. Open a console window and set up the DB2 environment:
Windows
db2cmd
1. Create the DB2 instance:
Windows
db2icrt -s ese -u db2admin,db2admin -r 50005,50005 ctginst1
set db2instance=ctginst1
db2start
db2 update dbm config using SVCENAME 50005 DEFERRED
db2stop
db2set DB2COMM=tcpip
db2start

4. Create the database.


db2 create db 'maxdb75' ALIAS 'maxdb75' using codeset UTF-8 territory US
pagesize 32 K
db2 connect to 'maxdb75'
db2 GRANT DBADM ON DATABASE TO USER db2admin
db2 GRANT SECADM ON DATABASE TO USER db2admin
db2 connect reset

5. Configure the database.


db2
db2
db2
db2
db2
db2
db2
db2
db2
db2
db2
db2
db2
db2
db2
db2
db2

update
update
update
update
update
update
update
update
update
update
update
update
update
update
update
update
update

db
db
db
db
db
db
db
db
db
db
db
db
db
db
db
db
db

cfg
cfg
cfg
cfg
cfg
cfg
cfg
cfg
cfg
cfg
cfg
cfg
cfg
cfg
cfg
cfg
cfg

for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for
for

maxdb75
maxdb75
maxdb75
maxdb75
maxdb75
maxdb75
maxdb75
maxdb75
maxdb75
maxdb75
maxdb75
maxdb75
maxdb75
maxdb75
maxdb75
maxdb75
maxdb75

using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using

SELF_TUNING_MEM ON
APP_CTL_HEAP_SZ 16384 DEFERRED
APPLHEAPSZ 2048 AUTOMATIC DEFERRED
AUTO_MAINT ON DEFERRED
AUTO_TBL_MAINT ON DEFERRED
AUTO_RUNSTATS ON DEFERRED
AUTO_REORG ON DEFERRED
AUTO_DB_BACKUP ON DEFERRED
CATALOGCACHE_SZ 800 DEFERRED
CHNGPGS_THRESH 40 DEFERRED
DBHEAP AUTOMATIC
LOCKLIST AUTOMATIC DEFERRED
LOGBUFSZ 1024 DEFERRED
LOCKTIMEOUT 300 DEFERRED
LOGPRIMARY 20 DEFERRED
LOGSECOND 100 DEFERRED
LOGFILSIZ 8192 DEFERRED

db2 update db cfg for maxdb75 using SOFTMAX 1000 DEFERRED


db2 update db cfg for maxdb75 using MAXFILOP 65335 DEFERRED
db2 update db cfg for maxdb75 using PCKCACHESZ AUTOMATIC DEFERRED
db2 update db cfg for maxdb75 using STAT_HEAP_SZ AUTOMATIC DEFERRED
db2 update db cfg for maxdb75 using STMTHEAP AUTOMATIC DEFERRED
db2 update db cfg for maxdb75 using UTIL_HEAP_SZ 10000 DEFERRED
db2 update db cfg for maxdb75 using DATABASE_MEMORY AUTOMATIC DEFERRED
db2 update db cfg for maxdb75 using AUTO_STMT_STATS OFF DEFERRED
db2 update db cfg for maxdb75 using STMT_CONC LITERALS DEFERRED
db2 update alert cfg for database on maxdb75 using db.db_backup_req SET
THRESHOLDSCHECKED YES
db2 update alert cfg for database on maxdb75 using db.tb_reorg_req SET
THRESHOLDSCHECKED YES
db2 update alert cfg for database on maxdb75 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

6. Restart DB2.
db2stop force
db2start

7. Reconnect to the database.


db2 connect to 'maxdb75'

8. Create a buffer pool.


db2 CREATE BUFFERPOOL MAXBUFPOOL IMMEDIATE SIZE 4096 AUTOMATIC PAGESIZE
32 K

9. Create table spaces.


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 GRANT USE OF TABLESPACE MAXDATA TO USER MAXIMO

10.

Grant authority to maximo.

db2 GRANT
DBADM,CREATETAB,BINDADD,CONNECT,CREATE_NOT_FENCED_ROUTINE,IMPLICIT_SCHEM
A,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

db2 create schema maximo authorization maximo

11.

Break the database connection.

db2 connect reset

finally create tables for maximo


C:\ibm\SMP\maximo\tools\maximo>maxinst -sMAXDATA -tMAXDATA

You might also like