Add new attachment

Only authorized users are allowed to upload new attachments.

This page (revision-40) was last changed on 27-May-2010 11:53 by RaffaelePedrini  

This page was created on 14-Apr-2010 14:30 by RaffaelePedrini

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 1 changed 49 lines
!!INSTALLAZIONE DB2
#tar -xzvf db2XXXXX.tar.gz (XXX dipende dalla versione db2 che vuoi installare...ad esempio db2exc_950_LNX_x86.tar.gz)
#lanciare db2_install (./db2_install)
#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)
#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)\\
%%prettyif
{{{
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\\
[Installazione|db2installazione]\\
[Backup multi-database e esportazione DDL|db2backup]\\
[Backup singolo database e Restore|db2restore]\\
[Indici e auto_runstats]
At line 51 removed 96 lines
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 : <preformatted>
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)
%%prettyif
{{{
#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 in realtà dopo N connessioni a db diversi il problema si ripropone.\\
Anche applicando la seguente\\
[https://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.messages.sql.doc/doc/msql01084c.html]\\
nulla si risolve...
%%prettyf
{{{
DB2 Versione 9.5 per Linux, UNIX e Windows
--------------------------------------------------------------------------------
SQL1084C
Impossibile assegnare segmenti di memoria condivisa.
Spiegazione
Durante l'attivazione del database il Database manager non può assegnare la memoria condivisa.
Risposta dell'utente
La causa di questo errore potrebbe essere delle risorse di memoria insufficienti per il Database manager. Controllare che siano disponibili le risorse instance_memory sufficienti per soddisfare i requisiti di memoria del database e le risorse di memoria sufficienti del sistema operativo. Potrebbe essere necessario aumentare l'impostazione di configurazione del Database manager instance_memory o ridurre l'impostazione di configurazione del database database_memory.
Su Linux a 32-bit, aumentare il parametro shmmax del kernel a 256 MB. Se l'errore persiste con 256 MB, provare ad aumentarlo fino alla dimensione di memoria fisica.
Su Linux a 64-bit, aumentare il parametro shmmax del kernel a 1 GB. Se l'errore persiste con 1 GB, provare ad aumentarlo fino alla dimensione di memoria fisica.
Quando vengono aumentate o ridotte le impostazioni, effettuare tale operazione in piccoli incrementi (da 5 a 10% alla volta) finché riesce l'operazione.
Se le risorse di memoria sufficienti esistono ed il problema persiste, contattare il rappresentante di assistenza tecnica con le seguenti informazioni:
Descrizione del problema
SQLCODE o numero messaggio
Contenuto di SQLCA se possibile
Impostazioni di configurazione del Database manager
Impostazioni di configurazione del database
sqlcode: -1084
sqlstate: 57019
}}}
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 particolare anche la successiva modifica non ha portato comunque agli effetti desiderati e dopo al massimo 3 connessioni a 3 db differenti si ottiene l'errore\\
[http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.uprun.doc/doc/t0008238.htm]\\
\\
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.\\
Consider migrating to DB2 Version 9.5 64-bit database product instead, to avoid running into any of the 32-bit kernel limitations.\\
Version Date Modified Size Author Changes ... Change note
40 27-May-2010 11:53 0.17 kB RaffaelePedrini to previous
39 14-Apr-2010 14:30 0.168 kB RaffaelePedrini to previous | to last
38 14-Apr-2010 14:30 0.142 kB RaffaelePedrini to previous | to last
37 14-Apr-2010 14:30 0.091 kB RaffaelePedrini to previous | to last
36 14-Apr-2010 14:30 0.056 kB RaffaelePedrini to previous | to last
35 14-Apr-2010 14:30 7.65 kB RaffaelePedrini to previous | to last
34 14-Apr-2010 14:30 7.65 kB RaffaelePedrini to previous | to last
33 14-Apr-2010 14:30 7.648 kB RaffaelePedrini to previous | to last
32 14-Apr-2010 14:30 7.592 kB RaffaelePedrini to previous | to last
31 14-Apr-2010 14:30 7.664 kB RaffaelePedrini to previous | to last
30 14-Apr-2010 14:30 7.366 kB RaffaelePedrini to previous | to last
29 14-Apr-2010 14:30 7.356 kB RaffaelePedrini to previous | to last
28 14-Apr-2010 14:30 7.079 kB RaffaelePedrini to previous | to last
27 14-Apr-2010 14:30 5.182 kB RaffaelePedrini to previous | to last
26 14-Apr-2010 14:30 5.05 kB RaffaelePedrini to previous | to last
25 14-Apr-2010 14:30 4.053 kB RaffaelePedrini to previous | to last
24 14-Apr-2010 14:30 3.979 kB RaffaelePedrini to previous | to last
23 14-Apr-2010 14:30 3.97 kB RaffaelePedrini to previous | to last
22 14-Apr-2010 14:30 3.964 kB RaffaelePedrini to previous | to last
21 14-Apr-2010 14:30 3.698 kB RaffaelePedrini to previous | to last
« This page (revision-40) was last changed on 27-May-2010 11:53 by RaffaelePedrini