Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel Server Installation Guide for Microsoft Windows > Sample Database Creation Scripts >
DB2 UDB Sample Script
Although you may edit the sample DB2 UDB creation script in any way to suit your site requirements, you must retain the command within the script that specifies your codeset, territory, and collating sequence or the language characteristics of your database will not be set up.
NOTE: Siebel Systems supports only binary collating sequence. Therefore, make sure that you include this value when you add the command for setting the language characteristics of your instance, as described in Creating the DB2 Universal Database for Windows and UNIX to the sample.
Sample Database Instance Creation Script (sampledbcfg.bat)
Edit the
sampledbcfg.bat
script to fit your site requirements and run it to create a DB2 database instance.CAUTION: This database instance creation script specifies LOGRETAIN RECOVERY. This requires that you first do a database backup. If you do not first back up the database, the script fails.
The following file can be found in the directory
\sea7xx\dbsrvr\DB2UDB
under Windows.rem ----------------------------------------------------------------------
rem
rem Copyright (C) 2001, Siebel Systems, Inc., All rights reserved.
rem
rem File: sampledbcfg.bat
rem Date: 9/10/01
rem Purpose: Sample script demonstrates how to configure DB2 and set up a database
rem for Siebel applications
rem
rem Edit the parameters below to reflect the default DB installation
rem To run this type in 'sampledbcfg' from command prompt
rem Make sure db2 installation is in system path
rem Make sure that directories exist prior to db creation
rem Make sure directories have read/write privileges
rem -----------------------------------------------------------------------
set DBNAME=SIEBEL
set TABLEOWNER=SIEBEL
set DBPATH=d:\DBPATH
set TEMPSPACE4K=d:\temp_4k
set TEMPSPACE16k=d:\temp_16k
set TEMPSPACE32k=d:\temp_32k
set TBS4KPATH1=d:\tbs_4k_1
set TBS4KPATH2=d:\tbs_4k_2
set TBS4KPATH3=d:\tbs_4k_3
set TBS16KPATH1=d:\tbs_16k_1
set TBS16KPATH2=d:\tbs_16k_2
set TBS16KPATH3=d:\tbs_16k_3
set TBS32KPATH1=d:\tbs_32k_1
set TBS32KPATH2=d:\tbs_32k_2
set TBS32KPATH3=d:\tbs_32k_3
db2set DB2_HASH_JOIN=NO
db2set DB2_RR_TO_RS=YES
db2set DB2_MMAP_WRITE=OFF
db2set DB2_MMAP_READ=OFF
db2set DB2_CORRELATED_PREDICATES=ON
db2set DB2_INDEX_2BYTEVARLEN=ON
db2set DB2_PIPELINED_PLANS=ON
db2set DB2_INTERESTING_KEYS=ON
db2set DB2_PARALLEL_IO=ON
db2set DB2_STRIPED_CONTAINERS=ON
db2set DB2MEMMAXFREE=3000000
db2set DB2MEMDISCLAIM=YES
rem ----------------------------------------
rem Set the database manager configuration parameters
rem ----------------------------------------
db2 update dbm cfg using SHEAPTHRES 100000
db2 update dbm cfg using DIR_CACHE YES
db2 update dbm cfg using QUERY_HEAP_SZ 16384
db2 update dbm cfg using ASLHEAPSZ 1024
db2 update dbm cfg using RQRIOBLK 65535
db2 update dbm cfg using MON_HEAP_SZ 128
db2 update dbm cfg using KEEPDARI YES
db2 update dbm cfg using MAXAGENTS 1000
db2 update dbm cfg using NUM_INITAGENTS 0
db2 update dbm cfg using MAX_COORDAGENTS 1000
db2 update dbm cfg using INDEXREC RESTART
db2 update dbm cfg using MAX_QUERYDEGREE 1
db2 update dbm cfg using INTRA_PARALLEL NO
rem ----------------------------------------
rem Bounce the server to pick up the configuration changes
rem ----------------------------------------
db2stop force
db2start
rem ----------------------------------------
rem Create the database
rem ----------------------------------------
db2 create database %DBNAME% USING CODESET 1252 TERRITORY US COLLATE USING IDENTITY CATALOG TABLESPACE MANAGED BY SYSTEM USING ('%DBPATH%\CATALOG') EXTENTSIZE 4 temporary TABLESPACE MANAGED BY SYSTEM USING ('%DBPATH%\TEMP') EXTENTSIZE 4 user TABLESPACE MANAGED BY SYSTEM USING ('%DBPATH%\USER') extentsize 8
rem ----------Set the database configuration parameters----------
db2 update db cfg for %DBNAME% using DFT_DEGREE 1
db2 update db cfg for %DBNAME% using DFT_QUERYOPT 3
db2 update db cfg for %DBNAME% using DBHEAP 7429
db2 update db cfg for %DBNAME% using CATALOGCACHE_SZ 5558
db2 update db cfg for %DBNAME% using LOGBUFSZ 512
db2 update db cfg for %DBNAME% using UTIL_HEAP_SZ 5000
db2 update db cfg for %DBNAME% using LOCKLIST 5000
db2 update db cfg for %DBNAME% using APP_CTL_HEAP_SZ 300
db2 update db cfg for %DBNAME% using SORTHEAP 1000
db2 update db cfg for %DBNAME% using STMTHEAP 8192
db2 update db cfg for %DBNAME% using PCKCACHESZ 2048
db2 update db cfg for %DBNAME% using STAT_HEAP_SZ 8000
db2 update db cfg for %DBNAME% using MAXLOCKS 20
db2 update db cfg for %DBNAME% using LOCKTIMEOUT 300
db2 update db cfg for %DBNAME% using CHNGPGS_THRESH 30
db2 update db cfg for %DBNAME% using INDEXSORT YES
db2 update db cfg for %DBNAME% using SEQDETECT YES
db2 update db cfg for %DBNAME% using DFT_PREFETCH_SZ 128
db2 update db cfg for %DBNAME% using LOGRETAIN RECOVERY
db2 update db cfg for %DBNAME% using MAXAPPLS 40
db2 update db cfg for $DBNAME% using AVG_APPLS 20
db2 update db cfg for %DBNAME% using MAXFILOP 500
db2 update db cfg for %DBNAME% using LOGFILSIZ 8000
db2 update db cfg for %DBNAME% using LOGPRIMARY 25
db2 update db cfg for %DBNAME% using LOGSECOND 100
db2 update db cfg for %DBNAME% using SOFTMAX 80
db2 update db cfg for %DBNAME% using APPLHEAPSZ 2500
db2 update db cfg for %DBNAME% using NUM_IOCLEANERS 4
db2 update db cfg for %DBNAME% using NUM_IOSERVERS 20
rem ----------Connect to the database, increase the default bufferpool----------
rem ----------Create the 16K and 32 bufferpools , grant permissions----------
db2 connect to %DBNAME%
db2 create bufferpool buf16k size 500 pagesize 16k
db2 create bufferpool buf32k size 500 pagesize 32k
db2 alter bufferpool ibmdefaultbp size 2000
db2 grant dbadm on database to user %TABLEOWNER%
db2 grant connect on database to group sse_role
rem--Disconnect from the database to activate new parameters and bufferpools---
db2 terminate
db2 force application all
rem ----------Create temporary tablespaces with 16K and 32K pagesizes----------
db2 connect to %DBNAME%
db2 create temporary tablespace temp16k pagesize 16 K managed by system using('%TEMPSPACE16k%') bufferpool BUF16K
db2 create temporary tablespace temp32k pagesize 32 K managed by system using('%TEMPSPACE32K%') bufferpool BUF32k
rem ----------Create regular tablespaces with 4K, 16K and 32K pagesizes----------
rem ----------Each tablespace in this example uses database managed storage----------
db2 create tablespace tbs_4k pagesize 4 K managed by database using (file '%TBS4KPATH1%' 10000, file '%TBS4KPATH2%' 10000, file '%TBS4KPATH3%' 10000) bufferpool ibmdefaultbp
db2 create tablespace tbs_16k pagesize 16 K managed by database using (file '%TBS16KPATH1%' 10000, file '%TBS16KPATH2%' 10000, file '%TBS16KPATH3%' 10000 ) bufferpool buf16k
db2 create tablespace tbs_32k pagesize 32 K managed by database using (file '%TBS32KPATH1%' 10000, file '%TBS32KPATH2%' 10000, file '%TBS32KPATH3%' 10000) bufferpool buf32k
db2 grant use of tablespace tbs_4K to %TABLEOWNER%
db2 grant use of tablespace tbs_16K to %TABLEOWNER%
db2 grant use of tablespace tbs_32K to %TABLEOWNER%
db2 terminate
Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel Server Installation Guide for Microsoft Windows Published: 25 June 2003 |