Professional Documents
Culture Documents
Timm
Zimmermann
DB2
for
z/OS
Development
SWAT
Team
!mm.zimmermann@de.ibm.com
Agenda
• Back
in
Time
-‐
The
basic
stuff
• RBA
&
LRSN
• DB2
logging
by
example
–
INSERT
• The
Challenges
with
6-‐byte
format
• The
solu?on
-‐
the
planned
new
EXTENDED
10-‐byte
format
in
DB2
11
• How
to
get
there
–
Conversion
and
Controls
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
1
5
at
open
at
close
3
BSDS
DB2
Recovery
Log
Manager
BEGIN_UR
OPEN
UNDO
/
REDO
UNDO
/
REDO
UNDO
/
REDO
COMMIT
END_UR
Checkpoint
RECORD
PAGESETS
DATA
INDEX
INDEX
RECORDS
RECORD
RECORD
DB2
RECOVERY
LOG
RBA
1000
RBA
2000
Begin
Unit
of
Recovery
(INSERT
DB)
End
Unit
of
Recovery
(Commit
or
Rollback)
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
The Challenge
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
REMEMBER:
there
is
no
formal
procedure
to
reset
the
LRSN!
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
Preparing
for
the
end
of
the
RBA
(not
the
end
of
the
world
J)
• Determine
the
remaining
log
RBA
range
using
DSNJU004
[remaining
log
RBA
range]
=
X’FFFFFFFFFFFF’
-‐
[HIGHEST
RBA
WRITTEN]
[remaining
log
RBA
range]
=
X’FFF80000000’
-‐
[HIGHEST
RBA
WRITTEN]
(32GB
log
space
len)
• Determine
the
average
number
of
bytes
logged
per
day
using
DSNJU004
u?lity
(b)
=
#
of
daily
created
archive
logs
[average
number
of
RBAs
logged
per
day]
=
b
*
(ENDRBA
–
STARTRBA)
• Es?mate
remaining
?me
[remaining
Gme
]
=
[remaining
log
RBA
range]
/
[average
number
of
bytes
logged
per
day]
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
The solu?on
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
0
0
0
0
9
A
6
5
7
4
0
A
248
Bytes
0
0
0
0
0
0
0
0
0
0
0
0
9
A
6
5
7
4
0
A
280
Bytes
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
1 Yo]abyte illustrated
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
C C 6 2 A 6 9 D 5 E 3 5
• Will
be
extended
on
the
high-‐order
and
low-‐order
bit
side
to
the
new
10-‐byte
(EXTENDED)
format
• high-‐order
10
bytes
of
the
stored
clock
(STCK)
value
1
addi?onal
byte
will
extend
3
bytes
at
the
end
will
increase
the
LRSN
range
to
cover
36,534
the
granularity
to
1
picosecond
years
0 0 C C 6 2 A 6 9 D 5 E 3 5 3 3 1 0 0 0
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
Recovery
Log
The
log
records
themselves
are
DB2
Catalog
columns
assigned
RBA
values
so
that
they
can
The DB2 catalog and be
located.
directory contain RBA and In
a
data
sharing
environment
each
LRSN information log
record
has
an
associated
LRSN
in several tables.
value
that
is
based
on
the
?me
the
Bootstrap
Data
Set
(BSDS)
log
record
was
created
(plus
any
Contains the LRSN and RBA values LRSN
delta).
that bound each
active and archive log data set as well The
LRSN
value
is
used
to
sequence
as a number of others that have log
records
from
mul?ple
members
various purposes.
in
a
data
sharing
group.
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
• DB2
log
manager
will
create
the
next
valid
LRSN
value
based
on
6-‐byte,
trunca?ng
the
exis?ng
10-‐byte
format
value
C
9
C
1
2
3
1
1
3
9
F
B
• If
the
next
valid
LRSN
value
would
be
beyond
valid
range
• UPDATE
will
be
not
possible
• Rollback
and
abort
processing
are
s?ll
allowed.
• Return
Code
00C2026D
is
issued
• User
Object
is
put
in
R/O
mode
un?l
converted
to
EXTENDED
format
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
CONVERSION PROCESS
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
Convert
Convert
DB2
Objects
BSDS
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
truncated
DB2 messages BSDS & DB2 recovery log DB2 catalog columns DB2 user objects
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
truncated
DB2 messages BSDS & DB2 recovery log DB2 catalog columns DB2 user objects
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
truncated
DB2 messages BSDS & DB2 recovery log DB2 catalog DB2 user objects
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
DB2
11
NFM
–
only
DB2
user
objects
converted
to
EXTENDED
Convert
Convert
BSDS
DB2
User
Objects
LRSN
value
DB2
10
NFM
DB2
11
CM
DB2
11
NFM
00CC6292657D4E812345
DB2
structures
Convert
Convert
DB2
User
Objects
BSDS
DB2 messages BSDS & DB2 recovery log DB2 catalog DB2 user objects
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
Recovery
ConsideraGons
• It
is
important
that
the
disaster
recovery
process
does
not
convert
any
objects
to
or
from
10
byte
extended
RBA
or
LRSN
format
during
the
recovery
and
rebuild
process.
• If
some
objects
are
in
extended
10-‐byte
format
• temporarily
change
the
UTILITY_OBJECT_CONVERSION
subsystem
parameter
to
NONE
before
you
begin
a
disaster
recovery
• do
not
specify
the
RBALRSN_CONVERSION
keyword
in
the
control
statements.
• Aner
the
disaster
recovery
is
complete,
change
the
UTILITY_OBJECT_CONVERSION
subsystem
parameter
to
its
original
value.
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
DSN1COPY
consideraGons
• As
of
DB2
11,
addi?onal
sanity
checks
will
be
performed
at
physical
open
?me
of
the
page
set
• The
record
row
format
such
RRF,
BRF
or
RBA
format
such
as
6
byte
verse
10
byte
RBA
format
will
not
be
validated
during
physical
open
because
the
informa?on
on
the
header
page
can
represents
• DSN1COPY
will
not
update
DB2
catalog
tables
to
reflect
actual
format
• Use
of
REPAIR
CATALOG
TABLESPACE
dbname.tsname
updates
values
• New
addi?onal
keyword
CATALOG
TEST
will
only
report
inconsistencies
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
Updates
in
a
mixed
Data
Sharing
Group
in
DB2
11
NFM
to
a
Page
in
BASIC
&
EXTENDED
format
P1
P2
DB2
M6
DB2
M10
LRSN
value
PGLOGRBA
PGLOGRBA
LRSN
value
?me
(basic)
(extended)
1st INSERT
100000000001
00100000000001000002
00100000000001000003 00100000000001000003
00100000000001000004 00100000000002000000
00100000000001000005 100000000002
100000000003 00100000000002000001
00100000000002000003 00100000000002000003
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
DB2
10
NFM
DB2
11
CM
DB2
11
NFM
00CC6292657D4E812345
DB2
structures
Convert
Convert
DB2
User
Objects
BSDS
DB2 messages BSDS & DB2 recovery log DB2 catalog DB2 user objects
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
June
12th
2014
DB2 GSE Workgroup BeLux 2014 ©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
Bootcamp
link
June
12th
2014
DB2 GSE Workgroup BeLux 2014 ©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
SYSLGRNX overview
APPENDIX A
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
• Log
ranges
are
defined
by
page
set
and
changes
between
page
set
open
and
pseudo-‐closed
• REPORT
RECOVERY
u?lity
will
list
the
content
• SQL
is
not
allowed
against
SYSLGRNX
before
DB2
10
• Housekeeping
of
SYSLGRNX
is
done
by
running
MODIFY
RECOVERY
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
APPENDIX B
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
Recovery
Log
• In
DB2
11
CM
the
recovery
log
content
is
iden?cal
to
DB2
10
• DB2
internally
operates
with
10
byte
format
• Which
will
be
truncated
to
6-‐bytes
format
log
records
• Once
the
BSDS
is
in
EXTENDED
format,
DB2
Log
Manager
will
generate
10-‐byte
format
log
records
• The
BSDS
must
be
converted
to
ensure
enough
room
to
store
extended
10-‐byte
format
log
records
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
Database
objects
• User
Database
objects
are
either
in
6-‐byte
(BASIC)
or
10-‐byte
(EXTENDED)
format
• There
is
no
automa?c
conversion
during
ENFM
or
NFM
processing
for
any
objects
• Can
be
done
at
any
?me
in
NFM
and
is
not
dependent
on
BSDS
log
format
• Conversion
is
done
using
the
REORG
/
LOAD
REPLACE
/
REBUILD
INDEX
u?li?es
once
in
NFM
• Two
DB2
subsystem
parameters
(ZPARMs)
exist
to
control
the
behavior
• The
format
of
newly
created
database
objects
• To
have
objects
automa?cally
converted
during
u?lity
execu?on
or
to
restrict
the
conversion
back
to
BASIC
format
using
REORG
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
APPENDIX C
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
+----------------------------+
| |
+----------------------------+
1_| 1900-07-20-06.22.54.381055 |
+----------------------------+
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
+----------------------------+
| |
+----------------------------+
1_| 2042-09-17-23.53.47.370496 |
+----------------------------+ ›
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Click
to
edit
Master
Gtle
style
Information Management for System z
LISTDEF
UGlity
.--------------.
V |
>>-LISTDEF--list-name----list-options-+------------------------><
...
>--+----------------+--+-------------------+-------------------><
'-BASIC--+-NO--+-' '-EXTENDED--+-NO--+-'
'-YES-' '-YES-'
• Specifies
that
LISTDEF
is
to
perform
a
final
filtering
of
the
INCLUDE
or
EXCLUDE
clause
contents
based
on
either
• BASIC
format
with
6-‐byte
RBA
or
LRSN
values.
• EXTENDED
format
with
10-‐byte
RBA
or
LRSN
values.
• This
opera?on
is
performed
last,
aner
LISTDEF
processes
all
other
keywords
on
the
INCLUDE
or
EXCLUDE
clause
June
12th
2014
DB2
GSE
Workgroup
BeLux
2014
©
2014
IBM
Corpora?on
Information Management for System z Click
to
edit
Master
Gtle
style
Recovery
ConsideraGons
…
• FLASHCOPY
CONSISTENT
• Format
1:
112233445566,112233445566,112233445566,
• Format
2:
123-‐112233445566,123-‐112233445566,123-‐112233445566,
June 12th 2014 DB2 GSE Workgroup BeLux 2014 © 2014 IBM Corpora?on