This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

INSTALLAZIONE DB2#

  1. tar -xzvf db2XXXXX.tar.gz (XXX dipende dalla versione db2 che vuoi installare...ad esempio db2exc_950_LNX_x86.tar.gz)
  2. lanciare db2_install (./db2_install)
  3. al prompt eseguire DB2.EXP o EXP (non cambiare percorso di installazione che propone e attendere fine installazione)
    in caso di dipendenze sulle librerie installare quanto richiesto (dipende dalla distribuzione/versione di linux ma in genere è necessario libaio1 e libstdc++5)
  4. eseguire i seguenti comandi
groupadd -g 999 db2adm
groupadd -g 998 db2udf
groupadd -g 997 TUONOMEISTANZADB2
useradd -u 1004 -g db2adm -m -d /home/db2adm db2adm
useradd -u 1003 -g db2udf -m -d /home/db2udf db2udf
useradd -u 1002 -g TUONOMEISTANZADB2 -m -d /home/TUONOMEISTANZADB2 TUONOMEISTANZADB2

passwd db2adm (settando la tua PASSWORD)
passwd db2udf (settando la tua PASSWORD)
passwd TUONOMEISTANZADB2 (settando la tua PASSWORD)

in base alla tua versione... (VX_Y)
/opt/ibm/db2/VX.Y/instance/dascrt -u db2adm
/opt/ibm/db2/VX_Y/instance/db2icrt -a server -u db2udf TUONOMEISTANZADB2
/opt/ibm/db2/VX_Y/cfg/db2ln
. /home/TUONOMEISTANZADB2/sqllib/db2profile

su - TUONOMEISTANZADB2 (se non ti fa fare come root i seguenti)
db2set DB2COMM=tcpip
db2licm -a 'path_dove_ho_fatto_il_tar'/exp/db2/license/db2expc_uw.lic
exit
Assegno il gruppo root come membro di TUONOMEISTANZADB2(faccio girare db2 come utente root)

vi /etc/group
TUONOMEISTANZADB2:x:997:root


db2start
db2stop
db2 update dbm cfg using svcename 50000
db2start

(usare db2set -all per vedere quelle già esistenti)
db2set DB2COMM=tcpip
db2set DB2AUTOSTART=yes



A livello generale vi /etc/profiles

aggiungere

. /home/TUONOMEISTANZADB2/sqllib/db2profile

Per approfondimenti http://www.linux.org/docs/ldp/howto/DB2-HOWTO/


DB2 EXPRESS RESTRICTION #

What are the restrictions for DB2 Express-C?
The following restrictions apply:
DB2 Express-C Version 9.5, Fixed Term License (FTL):
Two processor cores with a total of maximum of four cores
No more than 4 GB of memory
DB2 Express-C Version 9.5 (no charge, non-warranted):
Up to two processor cores
No more than 2 GB of memory
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.licensing.doc/doc/r0053243.html

PROBLEMA ALLOCAZIONE SHARED MEMORY#

Non so se in relazione alle restrizioni sopra succede che il db2, in fase di connessione ad uno o più db risponda:
SQL1084C Shared memory segments cannot be allocated. SQLSTATE=57019

Nel log del db2 dice:
MESSAGE : ZRC=0x850F0005=-2062614523=SQLO_NOSEG "No Storage Available for allocation" DIA8305C Memory allocation failure occurred. DATA #1 : Unable to attach 10 segments totalling 2521759744 bytes starting at address 0x00000000. One possible cause may be an improper setting for the shmmax Linux kernel tuneable.

Leggendo su internet ho provato a cambiare la shmmax (per ubuntu)

#così vedi la shmmax allocata dal sistema operativo
vi /proc/sys/kernel/shmmax

#provare a modificare tale impostazione in questo modo
vi /etc/sysctl.conf
#e aggiungere in fondo
kernel.shmmax = 4153352000

#Per applicare la modifica senza fare il reboot della macchina
sysctl -p /etc/sysctl.conf

#riverificare se è cambiato il valore shmmax rieseguendo il primo comando

NOTA:
Il valore da impostare per shmmax è da stabilire...metà della ram disponibile???
Dopo tale modifica non so per quanto il tutto possa funzionare
Per approfondimenti:
http://www.ibm.com/developerworks/db2/library/techarticle/dm-0406qi/
http://www.linuxforums.org/forum/redhat-fedora-linux-help/17025-how-can-i-change-shmmax.html
http://listserv.sap.com/pipermail/linux.general/2005-January/004484.html

In realtà tutte le prove che ho fatto finora non hanno funzionato e qui dicono che:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.qb.migration.doc/doc/c0007192.html
If you are migrating to DB2 Version 9.5 32-bit database product on Linux operating systems, the new multithreaded architecture brings new restrictions due to the 32-bit virtual memory address limit such as: Agent private memory for all agent threads is now allocated within a single process. The process memory space might not be large enough to allocate the aggregate of all private memory for all agents. You might need to reduce the number of agents configured. Support for multiple databases is limited because all database shared memory segments for all databases are allocated in a single process memory space. You can reduce the memory usage for each database so that you can activate all databases successfully. However, the database server performance is impacted.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 14-Apr-2010 14:30 by RaffaelePedrini.