0% found this document useful (0 votes)
220 views20 pages

DB2 LUW Training

This document provides an agenda and overview for a training on Unix-based operating systems, client-server architecture, DB2, and important concepts like the command line processor, DB2 environment and installation, DB2 objects like databases, tablespaces, and tables, data movement operations, backup and recovery, reorganization and runstats, and important DB2 configuration parameters. Key topics that will be discussed include the DB2 storage model, creating and altering databases, tablespaces, tables, indexes, exporting and importing data, backups, restores, reorganization, and database monitoring utilities.

Uploaded by

Soumyadeep Dey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
220 views20 pages

DB2 LUW Training

This document provides an agenda and overview for a training on Unix-based operating systems, client-server architecture, DB2, and important concepts like the command line processor, DB2 environment and installation, DB2 objects like databases, tablespaces, and tables, data movement operations, backup and recovery, reorganization and runstats, and important DB2 configuration parameters. Key topics that will be discussed include the DB2 storage model, creating and altering databases, tablespaces, tables, indexes, exporting and importing data, backups, restores, reorganization, and database monitoring utilities.

Uploaded by

Soumyadeep Dey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

u82 LuW 8aslc 1ralnlng

Soumyadeep uey
(Shommodeep)
Agenda/1oplcs
Cvervlew of unlx based Cperaung SysLem
Cvervlew of CllenL-Server archlLecLure
Cvervlew of u82 LuW - ackages
Command Llne processor (CL)
u82 LnvlronmenL and lnsLallauon
u82 lnsLance - lnsLance Cwner
u82 Cb[ecLs - daLabase, Lablespace, buerpools, Lables
u82 uaLabase ulrecLory
uaLa MovemenL - LxporL, lmporL, Load, admln_move_Lable
8ackup and 8ecovery
8LC8C and 8unS1A1S
uaLabase MonlLorlng - MCn_CL1* vlews/funcuons
SnapshoL MonlLorlng - S?Sl8MAuM.SnA* vlews
Mlscellaneous rouunes and vlews
Agenda/1oplc
lmporLanL SysLem Commands
lmporLanL u8M and u8 congurauon parameLers
******* u82 1lps and 1rlcks for dally llfe ********
?ou can add lf l have mlssed anyLhlng
unlx 8ased CS
Pow unlx CS (Cu) works
8AM/Memory
Shell
kernel
Pard ulsk
Pow Shell, kernel and P/W work collecuvely
8aslc Commands and lLs usage
- su, cd, ls, pwd, caL, more, less, ps, grep command
8aslcs of awk programmlng
- redlrecuon, /dev/null
user envlronmenLs
rocess lu, 1hread/kernel lu
8ooL and non-rooL user
Cache, Swap space (free" command)
u82 LnvlronmenL and CL
CL (Command Llne rocessor)
u82 rocess Model
u82 Memory Model
u82 SLorage Model
LeLs lnsLall u82 Lxpress-C
8ooL and non-rooL lnsLallauon
lnsLance - lnsLance Cwner/user
CreaLe/urop/SLarL/SLop and lnsLance
db2seL command Lo seL u82 envlronmenL values
u82 ackages - db2 express-C, workgroup edluon, u82
LnLerprlse Server Ldluon (LSL)
u82 verslons
/eLc/hosLs and /eLc/servlces le
u82 Cb[ecLs - uaLabase
u82 SLorage Model
AuLomauc SLorage, uaLabase aLh
uaLabase ulrecLory
uaLabase Cb[ecL Plerarchy
CreaLe a uaLabase (SAMLL)
uefaulL 1ablespaces (sklp)
ConnecL Lo a uaLabase
AC1lvA1L and uLAC1lvA1L a daLabase
uaLabase SLorage aLhs
CranL/8evoke for uaLabases
C8An1 <auLh> Cn uA1A8ASL 1C uSL8/C8Cu/8CLL <name> or
u8LlC
AuLh: CCnnLC1, C8LA1L1A8, u8AuM (wlLh/wlLhouL daLaaccess)
AuLh: 8lnuAuu, LCAu, SLCAuM
u82 Cb[ecLs - 1ablespace/8uerpools
u82 SLorage Model
ages, LxLenLs, ConLalners
*** uMS, SMS, AuLomauc SLorage Lablespaces
ageslze, LxLenLslze, llle SysLem Cache
8uerpools - Creauon, AlLerauon, ageslze, Slze
ConcepL of 8uerpools
ulerenL arameLers whlle creaung 1ablespaces and
8uerpools
CranL/8evoke for 1ablespaces
C8An1 uSL Cl 1A8LLSACL <Lablespace name> 1C uSL8/C8Cu/
8CLL <name> or u8LlC
u82 Cb[ecLs - 1ablespace/8uerpools
1ablespace arameLers:
ACLSlZL
MAnACLu 8? S?S1LM/uA1A8ASL/Au1CMA1lC S1C8ACL
Lx1Ln1SlZL
8ullL8CCL
nC llLL S?S1LM CACPlnC

8uerpool arameLers:
lMMLulA1L/uLlL88Lu
SlZL
ACLSlZL
nuM8LCCkACLS (sklp)
uaLabase arameLers (ln C8LA1L uA1A8ASL):
Au1CMA1lC S1C8ACL ?LS/nC
Cn <sLorage paLh> u8A1P Cn <daLabase paLh>
ACLSlZL
ul1_Lx1Ln1_SlZL


u82 Cb[ecLs - 1ables
1ables - CreaLe/AlLer/urop Lables
Schemas - CreaLe/urop
1ablespaces whlle creaung Lables
*** db2look uullLy
CranL, 8evoke for Lables
C8An1 <auLh> Cn 1A8LL <Lable name> 1C uSL8/C8Cu/
8CLL <name> or u8LlC
AuLh: AL1L8, CCn18CL, uLLL1L, lnuLx, lnSL81, uuA1L.
C8An1 CCn18CL Cn lnuLx <lndex name> 1C uSL8/
C8Cu/8CLL <name> or u8LlC
C8An1 AL1L8ln/C8LA1Lln/u8Cln Cn SCPLMA <schema
name> 1C uSL8/8CLL/C8Cu <name> or u8LlC
C8LA1L 1A8LL . ln <Lablespace name> lnuLx ln <lndex
Lablespace name>
uaLa MovemenL - LxC81/lMC81
LxC81:
LxC81 1C <lename> Cl <leLype> MCulllLu 8? <modler>
SLLLC1 * l8CM <Lable>
ML1PCu n ( <column name>)

llleLype: uLL/ WSl/ lxl
Modler: coldelx, chardelx
lMC81:
lMC81 l8CM <lename> Cl <leLype> MCulllLu 8? <modler>
ALLCW nC/W8l1L ACCLSS
lnSL81/lnSL81_uuA1L/8LLACL/8LLACL_C8LA1L/C8LA1L ln1C
<Lable name>

ALLCW nC ACCLSS - x mode LCCk
ALLCW W8l1L ACCLSS - lx mode LCCk (noL wlLh repl, repl_crL and crL)
uaLa MovemenL - LCAu/db2move/admln_move
** LCAu PASLS: LCAu ! 8ulLu ! uLLL1L ! lnuLx CC? (for onllne only)
1. LCAu - uaLa loaded lnLo Lable, lndex keys are collecLed and SC81ed
- 1able and lndex sLausucs are collecLed
- SAvL polnLs are esLabllshed
2. 8ulLu - lndexes are bullL.
3. uLLL1L - rows causlng unlque or prlmary key vlolauon are deleLed.
4. lnuLx CC? - lndes daLa ls copled from sysLem Lemp 18S Lo orlglnal 18S

LCAu l8CM <lename> Cl <leLype> MCulllLu 8? <modler>
8CWCCun1 n SAvLCCun1 n
lnSL81/8LLACL/8LS1A81/1L8MlnA1L ln1C <Lable name>
ALLCW nC/8LAu ACCLSS

LeLs 8efer Lo Lhe ul for parameLers

*** db2move <db name> <acuon> parameLers
acuon: LeLs refer Lhe ul
parameLers: leLs refer Lhe ul

*** AuMln_MCvL_1A8LL (moves a Lable onllne) - sklp as of now
8ackup and 8ecovery
u82 Logglng - updaLe, lnserL, deleLe
Clrcular and archlval logglng
8ecoverable and non-recoverable daLabase
LCC congurauon parameLers
LCC8lMA8?, LCCSLCCnu, paLh Lo log les, nLWLCCA1P (Acuve Logs)
LCC8ulSZ, LCCllLSlZ
LCCA8CPML1P1, LCCA8CPML1P2 (Archlve Logs)
Ml88C8LCCA1P, CvL8lLCWLCCA1P
8ecovery PlsLory llle - db2rhlsL.asc/db2rhlsL.bak
LlS1 PlS1C8? command
S?Sl8MAuM.u8_PlS1C8?
u821SCPC.PlS le
8ackup uullLy - 8ackup uaLabase command and parms (ul)
8esLore uullLy - 8esLore daLabase command and parms (ul)
8ollforward uullLy - 8ollforward daLabase command and parms (ul)
8ecover uullLy - 8ecover daLabase command and parms (ul)
Cpumlzlng 8ACku and 8LS1C8L performance
olnL-ln-1lme and lorward recovery
8edlrecLed 8esLore (sklp now)
Cancel backup/resLore/rfwd
Pouse-keeplng: 8LC8C and 8unS1A1S
8LC8C hases (CllLlnL or CLASSlC):
1. SC81 - 8ows of Lable are sorLed as per clusLerlng lndex or any lndex specled.
- lf lnuLxSCAn ls specled Lhen lndex ls scanned for SC81lng or 1A8LL
ls used.
2. 8ulLu - 1he reorganlzed copy of Lhe enure Lable ls bullL.
- new Lable ls bullL ln orlglnal Lablespaces or Lhe one specled.
3. 8LLACL - Crlglnal Lable ls replaced wlLh Lhe reorganlzed one.
- olnLers are creaLed beLween new and old.
4. 8LC8LA1L ALL lnuLxLS - All Lhe lndexes are recreaLed.

8LC8C hases (CnLlnL or lnLACL):
1. SelecL n" pages - uaLabase Manager selecLs a range of n" pages, n" belng Lhe
exLenL slze.
2. vacaLe Lhe 8ange - 1he selecLed range ls moved Lo free pages. 8lu
correspondence ls Lhere beLween CLu and nLW rows. Cld appllcauons use CLu
8lu for accesslng and new appllcauons use Lhe nLW 8lus aer movemenL.
3. llll 8ange - 8ange ls vacaLed and wrluen back ln reorganlzed formaL.
4. 1able ls 18unCA1Lu - When all Lhe rows have been Lhe Lable ls LruncaLed Lo
reclalm Lhe space.

8unS1A1S - LeLs ulscuss. S?n1Ax ln ul.
S1MM
Self 1unlng Memory ManagemenL: (sklp now)
uaLabase ClC: SLLl_1unlnC_MLM
noL all are congured for self Lunlng
uA1A8ASL_MLMC8?
CkCACPLSZ
SPLA1P8LS_SP8
SC81PLA
MAxLCCkS
LCCkLlS1
8uerpools
lmporLanL u8 ClCs
appl_memory
backup_pendlng, caLalogcache_sz
*** chngpgs_Lhres (u82_uSL_AL1L8nA1L_ACL_CLLAnlnC)
daLabase_memory
d_degree
d_exLenL_sz
d_prefeLch_sz
dlchkume
lockllsL
*** logarchmeLh1, logarchmeLh2, logbufsz, loglsz, logpaLh, logprlmary, logsecond
max_logs, num_log_span
max_locks
*** num_locleaners, num_loservers
pckcachesz
resLore_pendlng, rollfwd_pendlng
*** sheapLhres_shr, sorLheap
Lrackmod
*** uul_heap_sz
*** sLmLheap
sLaL_heap_sz
lmporLanL u8M ClCs
auLhenucauon
ddbpaLh
dlagpaLh
dlscover
*** lnLra_parallel
lnsLance_memory
num_poolagenLs
numdb
sheapLhres
*** svcename
_group
arameLers whlch can be seL as Au1CMA1lC
appl_memory
applheapsz
daLabase_memory
dbheap
mon_heap_sz
sLaL_heap_sz
sLmLheap
lnsLance_memory
lmporLanL S?S1LM commands
db2advls
db2ckbkp
*** db2ckrsL
***** db2exfmL
db2lcrL
db2ldrop
db2lllsL
db2level
db2move
db2look
db2pd
db2sLarL
db2sLop
*** db2mLrk
*** db2dlag

*** MosL lmp - u82 1lps and 1rlcks
1. db2pd command - Lhe besL of all !!!
- AcuvesLaLemenLs
- AgenLs
- Appllcauons
- Ldus
- 8eorgs
- 8unsLaLs
- 1ablespaces
- sorL
2. Pow Lo read LxLAln lan uslng db2exfmL".
3. Pow 8ollforward works LCC1A8CL1" and lLs slgnlcance, overow log
paLh.
4. Whlch uullues use uul_heap_sz and PCW.
3. *** Pow Lo read Lhe ouLpuL of free command and why lL ls used.
6. *** Pow Lo read Lhe ouLpuL of vmsLaL command, why lL ls used for.
7. llnd paLhs used by daLabase from backup lmage.
8. llnd appllcauon level sorL memory consumpuon.
9. 8esLore an accldenLally dropped Lablespace.
10. Pow Lo use db2dlag command.
11. Pow Lo use MCn_CL1_1A8LL funcuon.
12. S?Sl8MAuM.AuMln1A8lnlC







1hank ?ou!!!!

LeL me know lf you wanL me Lo cover someLhlng else as well......

You might also like