Sie sind auf Seite 1von 5

Structure and

Format
Enhancements
in
DB2 9
for z/OS
By Willie Favero

DB2 9 for z/OS has plenty of


great features; everyone
is bound to find something they like in
dawn of DB2 on the mainframe. A
simple table space has a maximum
size of 64GB.
table spaces, any newly created table
space in DB2 9 can’t be simple. The five
table space types available to you in
the latest version. This article explores: • Segmented: segmented table spaces, DB2 9 still include segmented, parti-
which didn’t arrive in DB2 until V2, tioned, and LOB. The two new table
• A feature that has generated consider- let you create multiple tables in a sin- spaces added in DB2 9 are:
able discussion—a new structure type gle table space. However, each table is
called universal table space contained in its own segment. You get • Universal (the subject of this article)
• An enhancement that you may not to pick the segment size, something • XML, which holds the new XML data
hear all that much about—a new stor- between four pages and 64 pages in in DB2 9. An XML table space is a little
age format referred to as reordered multiples of 4 (4, 8, 12, etc.). A seg- like an LOB table space. If an XML table
row format. mented table space also has a maxi- space is defined, the rows defining the
mum size of 64GB. XML are contained in a separate table
Both of these will significantly • Partitioned: allows multiple partitions; space called the base table space.
improve your DB2 experience by mak- each partition can have a possible maxi-
ing a couple aspects of DB2 easier to mum of 64GB and you can define from What’s a universal table space? The
manage. one to 4,096 partitions in current re- simplest way to explain a universal table
You may not have heard a lot of leases of DB2. However, only one table space is to say it’s a cross between a par-
clamoring for universal table space, but is allowed per partitioned table space. titioned table space and a segmented
it’s something many people have wanted • Large Object (LOB): the last table table space, hopefully giving you many
for years. As you deploy DB2 9, you’ll space type is for LOBs. If an LOB table of both of its parent’s best features. When
find this to be one of the more useful space is defined, the rows defining the using a universal table space, you get the
features and I believe it will soon LOB are contained in a separate table size and growth of partitioning while
become the de facto standard for build- space called the base table space. maintaining the space management,
ing DB2 objects. mass delete performance, and insert
With DB2 for z/OS V8, you have four When you upgrade to DB2 9, you’ll performance of a segmented table space.
types of table spaces to choose from: gain two new table space types. It’s kind of like having a segmented table
However, you end up with only a total space that can grow to a 128TB of data
• Simple: multiple tables per table space of five table space types. It’s the new (assuming the right DSSIZE and right
and all rows from all tables can share math. In DB2 9, you can no longer cre- number of partitions are specified) that
the same page in that table space. ate a simple table space. Although you also gives you partition independence.
Simple table spaces go back to the can still use and alter existing simple Another benefit of a universal table

56  •  z/Journal  • August/September 2007


_DAY 20: Trying to figure out how to
navigate a mixed IT environment.

_DAY 22: Decided to take back control by


going to the 2007 IBM System z Expo. For
some reason, Gil keeps looking for cheese.

Register today for the The power of many, Sessions will cover:
the simplicity of one.
2007 IBM System z Expo • IBM System z9™ BC and EC server updates
The IBM mainframe has experienced a • z/OS® V1.9 improvements
strong resurgence in the marketplace over • z/VM® V5.3 enhancements
When: September 17 – 21, 2007
recent years, largely as a result of its • z/VSE™ Version 4 refinements
Where: San Antonio, Texas – continued innovation and leadership in key • Linux® on System z™ developments,
San Antonio Marriott Rivercenter Linux Utilities
technologies such as multi-dimensional
and Marriott Riverwalk Hotels • WebSphere® Application Server for
virtualization, security, resiliency, workload z/OS V6 Implementation
Cost: $2,095 management and integration. This event • Server Time Protocol, GDPS® and
provides expert insight about the IBM Parallel Sysplex®
System z and how it provides the • Service Oriented Architecture (SOA)
foundation for helping to integrate and • WebSphere MQ, DB2®, CICS®, IMS™
manage your mixed IT environment. • Virtualization
• IBM System z Security
• Professional Development

To enroll and for more information, visit


ibm.com/training/us/conf/systemz
Or call 1-800-IBM-TEACH (1-800-426-8322)
Attention Exhibitors: Information about
exhibition and sponsorship opportunities © Copyright IBM Corporation 2007 – IBM, the IBM logo, System z9, z/OS, System z,
z/VM, z/VSE, GDPS, Parallel Sysplex, WebSphere, DB2, CICS, and IMS are registered
are available at the conference Web site to trademarks of the IBM Corporation in the United States, other countries, or both.
the right, click on “Be an exhibitor.” Other company product or service names may be trademarks or service marks of others.
space is the ability to use cloned tables; a before reaching its maximum number There’s also a new column in
universal table space is a prerequisite to of partitions, therefore, stopping its S Y S I B M . S Y S TA B L E S PA C E .
using CLONE tables in DB2 9. Of course, growth. If you don’t specify the MAXPARTITIONS contains (yes, you
like the original partition table spaces, a MAXPARTITIONS keyword, it defaults guessed it) the maximum number of
universal table space can contain only to 256 partitions. You also should speci- partitions for a partition-by-growth
one table per table space. A universal fy the segment size for the table space. If table space. The existing PARTITIONS
table space also must be managed by you don’t specify SEGSIZE, it defaults to column in SYSIBM.SYSTABLESPACE
DB2 (using DB2 storage groups). A uni- four pages. A four-page segment size will contain the number of physical par-
versal table space can’t be a user-man- typically isn’t optimal for whatever use titions that currently exist in a parti-
aged table space. Reordered row format, you have planned for the table space. tion-by-growth table space.
the last subject of this article, is always You can specify several combinations The other significant change in DB2
used for universal table space. Finally, of NUMPARTS, MAXPARTITIONS, 9 for z/OS is how the order of a table’s
before you get too excited, realize you and SEGSIZE. If NUMPARTS and columns is maintained when the under-
won’t be able to take advantage of uni- SEGSIZE are specified, you get a range- lying data is stored on disk. An ongoing
versal table space until DB2 9 for z/OS partitioned (partition by range) universal challenge for DB2 professionals has
New Function Mode (NFM). table space. If only the NUMPARTS key- been the placement of the fixed length
Universal table spaces come in two word is used (no SEGSIZE specified), the (CHAR) columns vs. the variable length
flavors: partition-by-growth and range- result is a traditional partition table space (VARCHAR) columns when defining a
partitioned (a.k.a. partition by range). that won’t take advantage of segmenta- row for a newly created table. There
Partition-by-growth universal table tion. If, however, only SEGSIZE is used have been many different opinions
spaces have no partitioning columns (no NUMPARTS or MAXPARTITIONS about what’s correct, efficient, and best.
and grow “on demand.” As data is keywords specified), you end up with a Most agreed that the VARCHAR col-
inserted into a partition-by-growth uni- traditional segmented table space, with umns should go at the end of the row.
versal table space, a new partition is no partitioning. Remember, there’s no However, no matter in what order you
automatically created when the current longer any combination of keywords that place the column, once DB2 hits a
partition becomes full. A range-parti- will let you create a simple table space. VARCHAR column in a row, it has to
tioned universal table space is similar to DB2 9 for z/OS also lets you implic- scan the row to find the rest of the col-
the partition table spaces we’ve all grown itly create a partition-by-growth univer- umns. Until DB2 reads the length on
up with, with the exception that it’s seg- sal table space using the CREATE the VARCHAR column (the two-byte
mented with all the advantages of a TABLE statement. The new phrase prefix on every VARCAHR column), it
segmented table space. PARTITION BY SIZE EVERY xxx G has no idea where the subsequent col-
Let’s take a closer look at partition- (where xxx is an integer less than or umns in that row begin.
by-growth universal table spaces. When equal to 64) tells DB2 to create this table DB2 9 has a strong solution to this
a partition of a partition-by-growth uni- in a partition-by-growth universal table quandary. Once you get to DB2 9 for
versal table space reaches its maximum space. If a table space name is specified z/OS NFM, all VARCHAR columns on
size from the addition of new rows, a on the CREATE TABLE’s IN clause, it newly created table spaces will be placed
new partition is automatically added to must point to a partition-by-growth at the end of the row. DB2 9 can make
the table space. The new partition takes table space. If a table space is specified, this type of decision because the row
on the characteristics of the previously the EVERY xxx G must specify the format in DB2 9 has changed. DB2 9
filled partitions, including using the same value as the table space’s DSSIZE. introduces “reordered row format,”
same dictionary if compression is turned If the table space is implicitly created, which is a straightforward, simple con-
on. In addition to copying over the dic- it’s created with LOCKMAX set to cept. A DB2 9 NFM row will have all
tionary, the new partition has the same SYSTEM, MAXPARTITIONS equal to the fixed length columns first, followed
FREESPACE, DEFINE, logging, and 256, SEGSIZE equal to 4, and DSSIZE by pointers to the beginning of each
TRACKMOD attributes. equal to 4G. Choose carefully before let- VARCHAR row. The pointers are fol-
Partition size, and how much data a ting DB2 implicitly create a partition- lowed by the actual variable length data.
single partition of a partition-by-growth by-growth table space. The only way to Rather than scan what could be some
universal table space can hold is deter- change the SEGSIZE or DSSIZE of an lengthy columns just to find the begin-
mined by the DSSIZE keyword, or implicitly created partition-by-growth ning of the column you’re looking for,
DSSIZE default if the keyword isn’t spec- table space is to drop and re-create the DB2 needs to scan only the list of point-
ified. If DSSIZE is 2GB, a new partition table space. There’s no ALTER ers to find the location for the begin-
is added when that 2GB partition is full. TABLESPACE option for DSSIZE and ning of the column you want.
If a partition-by-growth universal table SEGSIZE. As stated earlier, get reordered row
space is growing (adding partitions) on The DB2 catalog also has had a few format for any table space created in
its own, what prevents a runaway appli- changes in support of universal table DB2 9 NFM. You’ll also have your table
cation from taking over all your avail- space. The column TYPE in the catalog spaces, or table space partitions, con-
able disk space while building the table SYSIBM.SYSTABLESPACE has verted to reordered row format when a
maximum number of partitions? some new values: REORG or LOAD REPLACE is run
DB2 9 for z/OS has a new keyword against a table space or table space par-
on the CREATE/ALTER SQL statement: • K for a range-partitioned table space tition. Watch out for the partitioning
MAXPARTITIONS. As the parameter • G for a partition-by-growth table piece. If you REORG only selected par-
implies, MAXPARTITIONS tells DB2 space titions of a table space, then you’ll end
how many partitions a partition-by- • P for an implicit table space created up with some partitions—the ones that
growth universal table space can use for XML columns. have been reorganized in the new refor-

58  •  z/Journal  • August/September 2007


matted row format. The remaining par- and the dictionary won’t get rebuilt. NO. So, if you don’t specify this key-
titions that haven’t yet been reorganized APAR PK41156 was introduced to avoid word, your dictionary will be rebuilt.
will stay in basic row format. Basic row forcing everyone to change all their jobs However, if you do want to “honor”
format is the phrase used to describe for just one execution to get the diction- your current dictionary, you can add
the current row format, the row format ary rebuilt. APAR PK41156 modifies this keyword to your REORG or LOAD
prior to DB2 9 for z/OS. REORG and LOAD REPLACE so they REPLACE job and things will behave
There’s a potential issue that might ignore KEEPDICTIONARY for that one- as they did previously. This pertains
arise from using reordered row format. It
concerns those of you who have just
moved to DB2 9 for z/OS NFM and also S ound O ff !
use table space compression. If you’re Comment on this article by visiting http://community.zjournal.com/DB2,
satisfied with your compression's dic- and clicking on the thread titled “Structure and Format Enhancements in DB2.”
tionary, when you run REORG or LOAD
REPLACE, you should probably specify
the keyword KEEP­DICTIONARY. time run when the rows are reordered; only to table space compression; index
KEEPDICTIONARY avoids a dictionary this allows for a rebuild of the dictionary compression doesn’t use a dictionary.
rebuild, a task that could add a bit of regardless of the KEEPDICTIONARY The plan is to also convert a table
time to your REORG process. With DB2 setting. space to reordered row format if an
9, the first access to a table space by However, what happens if you real- ALTER ADD PART or an ALTER
REORG or LOAD REPLACE changes ly don’t want to do a rebuild of the ROTATE PART is performed on the
the row format from basic row format to compression dictionary right now? table space and you’re in NFM and none
the new reordered row format, assuming How do you get around this APAR’s of the exclusions mentioned in the pre-
you’re in DB2 9 NFM. It’s anticipated change? Well, the APAR also intro- vious paragraph exist on the table.
that rebuilding your compression dic- duces a new keyword for REORG and However, there are exceptions to the
tionary after converting to reordered row LOAD REPLACE that gives you a aforementioned process automatically
format will yield a more efficient com- workaround and still doesn’t require occurring. The DB2 catalog and direc-
pression dictionary. The possible prob- you to change your jobs if you simply tory table spaces and LOB table spaces
lem is that many shops have want DB2 to rebuild the dictionary. won’t be converted to the new reordered
KEEPDICTIONARY specified in their The new keyword is HONOR_ row format. In addition, any table space
existing REORG and LOAD job streams KEEPDICTIONARY and it defaults to containing (Continued on page 86)

Tired of MIPs Based Pricing?

Problem Solved.

Discover CDB Value Based Pricing


for DB2 for z/OS Data Management Solutions.
Data management solutions should be priced based on the data they manage, not on
overall power of your system. Unlike traditional mainframe MIPs based pricing,
CDB Value Based Pricing allows you to tailor your software purchase to meet any
object, application, system or budgetary need. At CDB, software pricing has a direct
relationship to the value you derive from our solutions. Don’t pay more. Solve your
DB2 software pricing problems today.
CDB Software, Inc.
800-627-6561
For more information and a whitepaper go to:
www.cdbsoftware.com/valuebased.htm
© Copyright CDB Software, Inc. All rights reserved. CDB/, CDB product names and the CDB logo are trademarks or registered trademarks of CDB Software
Inc. DB2 and z/OS are registered trademarks of International Business Machines Corporation. The IBM logo and the Business Partner emblem are
trademarks of International Business Machines Corporation in the United States, other countries, or both.

z/Journal  •  August/September 2007  •  59


Dealing With Data on the Mainframe Structure and Format Enhancements in DB2 10 Reasons to Fall in Love With the Mainframe
(Continued from page 45) 9 for z/OS  (Continued from page 59) … Again  (Continued from page 63)

personal information typically include a table that uses an EDITPROC or associated with their mainframes—
selective encryption of stored data, sepa- VALIDPROC also won’t be converted. while they find it difficult to achieve
ration of duties, and centralized, inde- As you move to reordered row for- similar visibility with other server plat-
pendent audit functions. mat, you should be aware that the reor- forms. But it’s still clear that the cost of
Auditing your network is one of the dered row format only affects how your hosting most comparable workloads
first steps toward achieving compliance data is stored on disk; it has no effect on on mainframes is generally much lower
with whatever regulations impact your the logical order of columns. Your col- than on alternative platforms.
industry. But after you perform that umns will still be returned in the order IBM’s latest specialty engines, in par-
assessment, it may become alarmingly specified when the table was created ticular, offer an exceptional opportunity
apparent that complete compliance and new columns (ALTER ADD) will to lower processing costs. They’re
doesn’t dovetail neatly with existing still logically go to the end of the table designed to run certain types of work-
business procedures. Often, changes in description. Reordered row format also loads at one-fourth or less of the cost of
practices and policies are required, in will add a few new columns to the DB2 running them on a general-purpose
addition to technical solutions, to 9 catalog and make changes to the for- engine. The system ensures these work-
achieve full compliance. mat of some log records. loads are managed in a manner consis-
It’s easy to feel overwhelmed by com- You also need to be cautious when tent with those dispatched on
pliance requirements, but these regula- using DSN1COPY with the OBID general-purpose engines while retain-
tions aren’t something you can afford to translation option (OBIDXLAT) to ing independent accountability for per-
ignore. Apart from businesses’ implicit move data between DB2 table spaces. formance management and charge-back
responsibility to protect consumer data, If one table space uses reordered row purposes. Workloads that can be redi-
fines for non-compliance are steep— format and the other table space uses rected from or isolated to specialty
and costs for publicly reportable data basic row format and you want to engines include:
breaches are punishing. All it takes is move their data, you can’t. The row
one successful attack to wipe out years formats of the table spaces being cop- • All work hosted by Linux system
of “savings” on not implementing secu- ied must match. If they don’t, you can images (IFL)
rity. With security experts agreeing that get unpredictable results. The good • Any pure Java code work that executes
online crime has become more sophisti- news is that the catalog table SYSIBM. within a Java Virtual Machine (JVM)
cated, more frequent, and better orga- SYSTABLEPART has a new column hosted by the z/OS operating system
nized over the past several years, do you called FORMAT that identifies what (zAAP)
really want to risk your bottom line as record format the table space is using. • All XML system services such as the
well as customer and investors’ confi- If it’s the original, pre-DB2 9 basic row non-validating parsing service (zAAP)
dence on the hopeful idea that it just format, the column FORMAT will be system-oriented work such as data
won’t happen to you? blank. If the table space has been con- encryption, communications, and
Finally, remember the importance of verted to the new DB2 9 reordered transaction monitoring (zIIP).
creating a culture of security in the corpo- row format, the column FORMAT will
rate environment, a culture where every contain an “R” (without the quotes, of The mainframe continues to deliver
employee—from the newest sales associ- course). Take the time to check before high business value. It remains the
ate to the CEO—understands the impor- doing a copy. gold standard by which all other plat-
tance of data privacy and protection. forms are measured in terms of reli-
When companies have an embedded cul- Conclusion ability, security, and scalability. That’s
ture, everything people in that company This article is only an introduction why phrases such as “mainframe-like”
do reflects that culture. Simply following to universal table space and reordered are often used as descriptive terms by
compliance guidelines to the letter ensures row format. There’s still more to the providers of alternative computing
that your organization may technically be story and more to learn. If you’d like to platforms.
in compliance, but that’s not enough. read more about these new features and Clearly, the mainframe is experienc-
Security measures not understood nor the rest of the enhancements in DB2 9 ing a renaissance of innovation that
fully embraced across the enterprise can for z/OS, check out the latest DB2 continues to drive down TCO. For IT
and will be circumvented. We can’t count Redbook from IBM, DB2 9 for z/OS organizations under constant pressure
on software to completely protect our sys- Technical Overview (SG24-7330). Z to do more with less, this could mean
tems. Smart policies, procedures, and falling in love with the mainframe—
people are just as important as choosing again. Z
the right security solution. Z About the Author
In the past 29 years, Willie Favero has been a customer,
worked for IBM, worked for a vendor, and is now
About the Author an IBM employee again. He has always worked About the Authors
Ulf T. Mattsson is CTO at Protegrity and creator of the with databases and has more than 20 years of DB2 Ron Higgin is vice president and principal architect in
company's database security technology. His extensive experience. A well-known, frequent speaker at CA’s Office of the CTO.
IT and security industry experience includes 20 years conferences and author of numerous articles on DB2, Email: ron.higgin@ca.com
with IBM as a manager of software development and a he’s currently with North American Lab Services for DB2 __________________________________
consulting resource to IBM's research and development for z/OS, part of IBM’s Software Group. Marcel den Hartog is director of marketing, EMEA,
organization in IT architecture and IT security. Email: wfavero@attlgobal.net at CA.
Email: ulf.mattsson@protegrity.com Website: www.ibm.com/software/data/db2/support/db2zos/ Email: marcel.denhartog@ca.com

86   •   z / J o u r n a l   • A u g u s t / S e p t e m b e r 2 0 0 7

Das könnte Ihnen auch gefallen