WPS: Migrando para o DB2 - Preparando o DB2

Nosso ambiente é o DB2 Versão 9.1 em uma máquina remota.

Para a documentação detalhada veja

http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1m0/topic/com.ibm.wp.ent.doc/config/stdalone_unix_db2_create_remote.html

Sobre Database Member Manager (wmmdb)

O wmmdb não existe mais no portal 6.1. Ele passa a utilizar o VMM do WAS 6.1

1. Realizando um backup da instalação do Portal via Tar
Vá para o diretório

cd /opt/IBM/WebSphere/

fazendo um backup com o tar

tar -czvf portal6_1.tgz PortalServer/

2. Configurando a instância do DB2
Entre com o usuário db2inst1 no servidor onde está instalando o DB2

su - db2inst1

e digite os seguintes comandos

db2set DB2_RR_TO_RS=yes db2set DB2_EVALUNCOMMITTED=YES db2set DB2_INLIST_TO_NLJN=YES db2 "UPDATE DBM CFG USING query_heap_sz 32768" db2 "UPDATE DBM CFG USING maxagents 500" db2 "UPDATE DBM CFG USING sheapthres 0"

3. Criando as databases necessárias

 * Database Release = release

db2 "CREATE DB release using codeset UTF-8 territory us PAGESIZE 8192" db2 "UPDATE DB CFG FOR release USING applheapsz 4096" db2 "UPDATE DB CFG FOR release USING app_ctl_heap_sz 1024" db2 "UPDATE DB CFG FOR release USING stmtheap 16384" db2 "UPDATE DB CFG FOR release USING dbheap 2400" db2 "UPDATE DB CFG FOR release USING locklist 1000" db2 "UPDATE DB CFG FOR release USING logfilsiz 4000" db2 "UPDATE DB CFG FOR release USING logprimary 12" db2 "UPDATE DB CFG FOR release USING logsecond 20" db2 "UPDATE DB CFG FOR release USING logbufsz 32" db2 "UPDATE DB CFG FOR release USING avg_appls 5" db2 "UPDATE DB CFG FOR release USING locktimeout 30" db2 "UPDATE DB CFG FOR release using AUTO_MAINT off"


 * Database Community = commdb

db2 "CREATE DB commdb using codeset UTF-8 territory us PAGESIZE 8192" db2 "UPDATE DB CFG FOR commdb USING applheapsz 4096" db2 "UPDATE DB CFG FOR commdb USING app_ctl_heap_sz 1024" db2 "UPDATE DB CFG FOR commdb USING stmtheap 16384" db2 "UPDATE DB CFG FOR commdb USING dbheap 2400" db2 "UPDATE DB CFG FOR commdb USING locklist 1000" db2 "UPDATE DB CFG FOR commdb USING logfilsiz 4000" db2 "UPDATE DB CFG FOR commdb USING logprimary 12" db2 "UPDATE DB CFG FOR commdb USING logsecond 20" db2 "UPDATE DB CFG FOR commdb USING logbufsz 32" db2 "UPDATE DB CFG FOR commdb USING avg_appls 5" db2 "UPDATE DB CFG FOR commdb USING locktimeout 30" db2 "UPDATE DB CFG FOR commdb using AUTO_MAINT off"


 * Database Customization = custdb

db2 "CREATE DB custdb using codeset UTF-8 territory us PAGESIZE 8192" db2 "UPDATE DB CFG FOR custdb USING applheapsz 4096" db2 "UPDATE DB CFG FOR custdb USING app_ctl_heap_sz 1024" db2 "UPDATE DB CFG FOR custdb USING stmtheap 16384" db2 "UPDATE DB CFG FOR custdb USING dbheap 2400" db2 "UPDATE DB CFG FOR custdb USING locklist 1000" db2 "UPDATE DB CFG FOR custdb USING logfilsiz 4000" db2 "UPDATE DB CFG FOR custdb USING logprimary 12" db2 "UPDATE DB CFG FOR custdb USING logsecond 20" db2 "UPDATE DB CFG FOR custdb USING logbufsz 32" db2 "UPDATE DB CFG FOR custdb USING avg_appls 5" db2 "UPDATE DB CFG FOR custdb USING locktimeout 30" db2 "UPDATE DB CFG FOR custdb using AUTO_MAINT off"


 * Database Document Manager, Personalization, Web Content Management = jcrdb

db2 "CREATE DB jcrdb using codeset UTF-8 territory us PAGESIZE 8192" db2 "UPDATE DB CFG FOR jcrdb USING applheapsz 4096" db2 "UPDATE DB CFG FOR jcrdb USING app_ctl_heap_sz 1024" db2 "UPDATE DB CFG FOR jcrdb USING stmtheap 16384" db2 "UPDATE DB CFG FOR jcrdb USING dbheap 2400" db2 "UPDATE DB CFG FOR jcrdb USING locklist 1000" db2 "UPDATE DB CFG FOR jcrdb USING logfilsiz 4000" db2 "UPDATE DB CFG FOR jcrdb USING logprimary 12" db2 "UPDATE DB CFG FOR jcrdb USING logsecond 20" db2 "UPDATE DB CFG FOR jcrdb USING logbufsz 32" db2 "UPDATE DB CFG FOR jcrdb USING avg_appls 5" db2 "UPDATE DB CFG FOR jcrdb USING locktimeout 30" db2 "UPDATE DB CFG FOR jcrdb using AUTO_MAINT off"


 * Database Feedback = fdbkdb

db2 "CREATE DB fdbkdb using codeset UTF-8 territory us PAGESIZE 8192" db2 "UPDATE DB CFG FOR fdbkdb USING applheapsz 4096" db2 "UPDATE DB CFG FOR fdbkdb USING app_ctl_heap_sz 1024" db2 "UPDATE DB CFG FOR fdbkdb USING stmtheap 16384" db2 "UPDATE DB CFG FOR fdbkdb USING dbheap 2400" db2 "UPDATE DB CFG FOR fdbkdb USING locklist 1000" db2 "UPDATE DB CFG FOR fdbkdb USING logfilsiz 4000" db2 "UPDATE DB CFG FOR fdbkdb USING logprimary 12" db2 "UPDATE DB CFG FOR fdbkdb USING logsecond 20" db2 "UPDATE DB CFG FOR fdbkdb USING logbufsz 32" db2 "UPDATE DB CFG FOR fdbkdb USING avg_appls 5" db2 "UPDATE DB CFG FOR fdbkdb USING locktimeout 30" db2 "UPDATE DB CFG FOR fdbkdb using AUTO_MAINT off"


 * Database Likeminds = lmdb

db2 "CREATE DB lmdb using codeset UTF-8 territory us PAGESIZE 8192" db2 "UPDATE DB CFG FOR lmdb USING applheapsz 4096" db2 "UPDATE DB CFG FOR lmdb USING app_ctl_heap_sz 1024" db2 "UPDATE DB CFG FOR lmdb USING stmtheap 16384" db2 "UPDATE DB CFG FOR lmdb USING dbheap 2400" db2 "UPDATE DB CFG FOR lmdb USING locklist 1000" db2 "UPDATE DB CFG FOR lmdb USING logfilsiz 4000" db2 "UPDATE DB CFG FOR lmdb USING logprimary 12" db2 "UPDATE DB CFG FOR lmdb USING logsecond 20" db2 "UPDATE DB CFG FOR lmdb USING logbufsz 32" db2 "UPDATE DB CFG FOR lmdb USING avg_appls 5" db2 "UPDATE DB CFG FOR lmdb USING locktimeout 30" db2 "UPDATE DB CFG FOR lmdb using AUTO_MAINT off"

4. Ajustando DB2 Content Manager Runtime Edition (jcrdb)
Atenção para Trocar a senha abaixo

db2 "CONNECT TO jcrdb USER db2inst1 USING ChangeYourPasswordHere"

db2 "CREATE BUFFERPOOL ICMLSFREQBP4 SIZE 1000 PAGESIZE 4 K" db2 "CREATE BUFFERPOOL ICMLSVOLATILEBP4 SIZE 8000 PAGESIZE 4 K" db2 "CREATE BUFFERPOOL ICMLSMAINBP32 SIZE 8000 PAGESIZE 32 K" db2 "CREATE BUFFERPOOL CMBMAIN4 SIZE 1000 PAGESIZE 4 K" db2 "CREATE REGULAR TABLESPACE ICMLFQ32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('ICMLFQ32') BUFFERPOOL ICMLSMAINBP32" db2 "CREATE REGULAR TABLESPACE ICMLNF32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('ICMLNF32') BUFFERPOOL ICMLSMAINBP32" db2 "CREATE REGULAR TABLESPACE ICMVFQ04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('ICMVFQ04') BUFFERPOOL ICMLSVOLATILEBP4" db2 "CREATE REGULAR TABLESPACE ICMSFQ04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('ICMSFQ04') BUFFERPOOL ICMLSFREQBP4" db2 "CREATE REGULAR TABLESPACE CMBINV04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('CMBINV04') BUFFERPOOL CMBMAIN4" db2 "CREATE SYSTEM TEMPORARY TABLESPACE ICMLSSYSTSPACE32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('icmlssystspace32') BUFFERPOOL ICMLSMAINBP32" db2 "CREATE SYSTEM TEMPORARY TABLESPACE ICMLSSYSTSPACE4 PAGESIZE 4 K MANAGED BY SYSTEM USING ('icmlssystspace4') BUFFERPOOL ICMLSVOLATILEBP4" db2 "DISCONNECT jcrdb" db2 "TERMINATE"