May 17, 2012 |
|
DB2Night Replays |
The DB2Night Show Z24: DB2 Utilities - An updatePresented by: Klaas Brant IBM Gold Consultant - KBCE b.v. DB2 Utilities - An update Replays available in WMV and M4V formats! 98% of our audience learned something! Today we have a whole chapter from the official KBCE DB2 V8 to V10 training. All about utilities and what has changed in V9 and V10. Watch, learn and enjoy...(Read more) |
|
Triton Consulting |
Iqbal Goralwalla Wows the Audience with DB2 9.7 Fix Pack “Pearls” on DB2Night Show™Were you unfortunate enough to miss IBM Champion Iqbal Goralwalla talk about DB2 LUW 9.7 Fix Pack “Pearls” on the latest DB2Night Show™? It was a great show. Luckily replays are still available, so why not take time out to … Continue reading →(Read more) |
May 16, 2012 |
Kim May |
Greetings from IDUG – Lead Catching?Since early this year IBM has been promoting efforts to better collaborate with their Business Partners by passing more IBM leads to partners. I am aware of two campaigns in 2012 where IBM has...(Read more) |
Omer Brandis |
SAP Classification vs Enhancing Master Data Tables - part IIII've recently learned of a better way to select classification data without the need for many join's or subselect statements.... |
May 15, 2012 |
Willie Favero |
Deprecated: Such a cool word yet a word so misunderstood(Posted May 15, 2012) I wanted to talk about the DSNZPARM keys deprecated in DB2 10. And yes I do realize that I listed them out in a previous post. However, this time I wanted to discuss why it’s important today, maybe even before migrating to DB2 10, to plan...(Read more) |
Smarter Questions |
PureApplication delivers expertise. Exalogic requires it.Oracle’s co-president recently asserted that IBM is behind in system integration. Far from the actual reality. Moreover, that seems as an attempt to obscure the fundamental gap facing Oracle’s Exa...(Read more) |
Frank Fillmore |
Oracle to DB2 Migration: Why and HowI’m headed out the door to attended the 2012 International DB2 Users Group Technical Conference in Denver. But first, I wanted to post two related items: A White Paper, ”SmarterQuestions...(Read more) |
Dave Beulke |
DB2 10 for z/OS Migration Tips — IDUG NetworkingThe International DB2 User Group (IDUG) conference started yesterday with the full day educational seminars. This morning’s keynote session highlighted the new DB2 10 for LUW, DB2 10 for z/OS and all their great features. There are always informative sessions, numerous networking opportunities...(Read more) |
|
DB2 Express-C Team |
ibm_db 2.5.10 adapter for Ruby and RailsThe release of DB2 Express-C 10.1 was accompanied by updates to drivers, extensions, and adapters for many programming languages. One of them is the ibm_db adapter for Ruby and Rails. It's straightforward on Windows and Linux: gem install ibm_db From experience, I would expect Linux...(Read more) |
DB2utor |
May Mainframe MadnessFor all the posts I've had of late about free educational and technical materials, I've been remiss to mention what my own company has been... |
May 14, 2012 |
Serge Rielau |
DB2 Tech Talk: Oracle Database and PL/SQL Compatibility Features of DB2Join me in this DB2 Tech Talk where I will provide an update on DB2's Oracle Compatibility features. I will: This technical tour is the third DB2
Tech Talk on the DB2 10 and InfoSphere Warehouse 10 product releases.
Additional webcasts will be offered throughout 2012 to provide an in-depth discussion on the features in these releases. May 31, 2012 Also be reminded that on May 11, 2012 at 12:30 EST we will discuss Optimizing Storage Utilization for DB2 10
|
Serge Rielau |
DB2 Tech Talk: Optimizing Storage Utilization for DB2 10Learn about the new storage optimization features in the newly available DB2 10 product. We will cover three areas including:
This technical tour is the second DB2
Tech Talk on the DB2 10 and InfoSphere Warehouse 10 product releases.
May 11, 2012 |
Serge Rielau |
DB2 10: Using locally defined types and proceduresIntroductionRecently I discussed the motivation behind using anonymous blocks. The reasoning was centered around the need to execute complex scripts on the server without being able or willing to define a routine in the database's catalog. Inside of an anonymous block you can then define all the logic flow you need. You can also declare local variables to hold temporary data.
DB2 10 expands beyond that by allowing you to declare local types and local procedures. Local typesWhen ARRAY types were introduced in DB2 9.5 we discussed whether there should be predefined types for arrays of any base types. In the end we decided against this, but the point in favor was that such arrays may be commonly used and it would be annoying fro an application developer to request permission from the DBA to get these types created. Or it may be that different developers create all sorts of arrays of integers in numerous schemata with different or the same names. A point against predefining arrays of base types was that the next step would have been to define arrays for any row types that are created as well. In the end locally declared types make away with the need to predefine any types.
Their definition is pretty self explanatory I think - this will be short post.
As you can see the only difference between a create type statement and a declared type is the keyword DECLARE.
Here are the rules which apply:
Local proceduresAdding support to locally declare procedures is just another natural extension to supporting local variables and types. Common usage is the implementation of logic patterns that are repetitive within a larger piece of logic. But the pattern isn't of importance beyond the scope of the block, so it's not useful to harden it into the catalog. In the example below the procedure "TRACE" encapsulates an insert statement. The only purpose here is to improve readability:
This example, small as it may be already displays an important property of locally declared procedures:
The procedure can use local variables and even local types that are defined in an outer compound block. Here are the overall rules:
Local FunctionsLocal functions are unfortunately not yet supported in DB2 10.1.
Time and resources are limited. But I'm sure we'll get to them in due time. |
Nivasreddy Inaganti |
Google searches for db2 terms & DBA job trendsHave you ever wondered about the popular db2 terms on Google.. How many people are searching for a word like ‘db2 compression’ ? How many people are interested in the...... |
May 12, 2012 |
Willie Favero |
Metrics have been enhanced for DB2 stored procedures and UDFs(Posted May 12, 2012) For all of you that love to do performance and tuning of you DB2 subsystems, DB2 land is about to make your job a whole lot easier in the stored procedure and user-defined function (UDF) categories by improving some of the existing metrics and adding...(Read more) |
Craig Mullins |
A Cookbook for DB2 LUW DevelopersI recently came across an interesting new book on DB2 for Linux, Unix, and Windows titled IBMDB2 9.7 Advanced Application Developer Cookbook. The book shakes up the typical technology book with a cookbook metaphor and succeeds in delivering the best of both of those approaches. The authors, Sanjay Kumar and Mohankumar Saraswatipura, have obviously used the technology and clearly explain to the...(Read more) |
May 11, 2012 |
ChannelDB2 Videos |
DB2 Tech Talk: Optimize Storage and Minimize Administration with DB2 10Learn about the new storage optimization features in the recently announced DB2 10 product. We will cover three areas including: Adaptive Compression, Multi-Temperature Storage and Workload Management. |
Willie Favero |
APAR Friday: Another parallel REORG enhancement(Posted May 11, 2012) Well over a year ago (Feb 2011) I blogged about the addition of the PARALLEL keyword that was made available on the REORG TABLESPACE LIST utility control statement. (See “APAR Friday: Another great REORG enhancement”) As a result of the group ...(Read more) |
|
DB2Night Replays |
The DB2Night Show #82: DB2 LUW 9.7 Fixpack "Pearls" - cool new stuff!Special Guest: Iqbal Goralwalla Principal Consultant, Triton Consulting, UK LISTAGG, db2cklog, db2pd, db2caem, db2support, and more! Replays available in WMV and MP4 formats! 100% of our audience learned something! Our special guest, Iqbal Goralwalla, shared with our audience his advice, tips, and experience with new commands and features delivered via DB2 9.7 Fixpacks. His findings and advice are PRICELESS. Several command examples are...(Read more) |
Ember Crooks |
IDUG 2012 – NA Tech Conference in DenverMany of my blog posts are ones that can be read two years down the road and still have technical relevance. This is not one of those. This is about how excited I am to go to the IDUG DB2 Tech...... |
May 10, 2012 |
FreeDB2 |
Happy Mother’s Day to Big Data and Cloud MamasWith the Mothers Day upon us and with many of my blog followers having mothers (my big data analytics software estimates this to be at close to 100%) or mothers themselves, I thought I’d post this infographic just as a reminder to do something nice for all the mothers out there. Not Yo Mama’s Mama – a Digital Mom Infographic by Internet Exposure(Read more) |
Willie Favero |
It's not to soon to start thinking about IOD 2012 in Las Vegas(Posted May 10, 2012) The 2012 Information on Demand (IOD) conference is only 5 months away... (where has this year gone already).... It’s being help once again in Las Vegas at the Mandalay Bay on October 21-25. Last years conference was huge. This...(Read more) |
Susan Visser |
IDUG Tweets & Facebooks :)I am looking forward to going to Denver this weekend in preparation of IDUG NA which starts on Monday, May 14. I'm hoping to blog and tweet from there, so regardless if you are at the conference or not, you can follow what's going on. Here are some key links:
From Twitter:
From Facebook:IDUG's Facebook page will also be pretty busy during the conference too: www.facebook.com/IDUGDB2 AggregatorScott Hayes has set up an aggregator site that includes all of the tweet related to IDUG: http://bit.ly/idugna12 Challenge
Mike Krafick is the social media guru for IDUG. He tweets from IDUGDB2 and is looking for more followers. He's trying to get more followers than my twitter account susvis. Let the challenge begin!
More information about this year's IDUG Conference:
On Tuesday in the Exhibit Hall, we'll be handing out a limited supply of signed copies of the New Flashbook for DB2 10. For those of you not at the conference, follow my blog for information on how you can download a copy for free.
Two other books will be launching at IDUG this year. We don't have a bookstore, but be sure to speak to the authors for information on ordering a copy for yourself at a discount offered to IDUG attendees:
The winner of this year's DB2's Got Talent competition was Kohli (We HAVE a winner! DB2's Got Talent Competition) and he chose to attend IDUG Denver as his prize. I'm looking forward to meeting Kohli. If you were also a competitor, please find me at the show and introduce yourself.
If you're interested in writing articles or books, or reviewing any of the upcoming books... also find me and let me know. I may have some interesting opportunities for you!
Susan |
|
DB2 Express-C Team |
Learn and administer DB2 with Technology Explorer 4.2Coming on the heels of DB2 Express-C 10.1 is Technology Explorer 4.2. The Technology Explorer (TE) is a light weight, web based console for DB2 for Linux, UNIX and Windows. The Technology Explorer strives to be a teaching tool for all users of DB2. Whether you're just starting to use DB2, or...(Read more) |
Serge Rielau |
Returning inserted rows (and updated and deleted)MotivationRemember the days when DB2 re-entered the TPC-C fight after a long hiatus? The time was DB2 8.1 FP4. I seriously do not remember years.. Time passes in releases. While my colleagues were tuning code path, bufferpools disks my team was looking at something more fundamental. What can we do to make SQL as efficient as possible for TPC-C. And ideally how can we make SQL more efficient for any class of OLTP workload. In other words how can we pour the most bang into the least SQL for a typical OLTP transaction? The result was what we called the new SQL. If I recall correctly it consisted out of the following enhancements:
In this post I want to dive into the last bullet.
DB2 8.1 FP4 was a long time ago, but there are still developers who are not yet familiar with this powerful feature. So it warrants some attention. The ProblemOne very common task in an OLTP system is that of order processing. You can distinguish between three phases of order processing
Taking an orderTaking an order is comprised of:
This is where the inline table function came in in TPC-C. Our schema is simple:
To submit an order an order-id must be generated. Different ways to do so exist is various products:
Either two SQL Statements need to be executed or the statement need to comply with very specific properties: E.g. single row insert with identity column. As a response to this problem each some vendors have invented extensions to INSERT, UPDATE and DELETE such as a WITH RETURN clause. The purpose of the clause is to pick up on new, changed or deleted rows and pass them back to the client or insert them into a table or variable. The approach we took in DB2 has been radically different.
What we did in DB2 was to simply expose the trigger transition table NEW TABLE in the from-clause. So, when you put an INSERT statement into the from clause that insert statement is executed and in the process a transition table is produced. That transition table, which includes all the modifications of any before triggers can then be queried. Note in the example above that we did not only pick up the generated "ORDER_ID", but also the value generated for the "STAMP" column. How is that different from an INSERT WITH RETURN as available in Oracle? INSERT WITH RETURN requires an INTO clause. That is the returned values must leave SQL and be returned into a variable. Once they are returned you can re-scan them for further processing. Pushing INSERT into the from clause allows for the full power of SQL to be applied for further processing.
Any client language that knows how to process a cursor can immediately use the feature. DB2 can handle multiple order inserts:
Better yet, DB2 can process the result. For example it can do totals on the orders:
The question which you should immediately ask is: What is the overhead of NEW TABLE? How is this different than inserting the rows into an array or temp table and then rescanning that array?
An explain of the statement above will show:
Note the absence of any temp here. The INSERT (6) serves immediately as the input for the OLAP function. SORT (5) handles the "ORDER BY order_id" of the SUM. SORT (3) however is interesting:
3) SORT : (Sort) ... SORTKEY : (Sort Key column) NONE This SORT doesn't actually sort. All it does is to force the cursor to be INSENSITIVE. This assures that the INSERT is completed when the cursor is OPENed.
A common technique is to open such cursors as WITH HOLD and then COMMIT before first fetch. That way no locks are being held while the cursor is being fetched. Dispatching an orderAfter the order has been accepted it needs to be processed. This can either happen in a single database transaction or the workflow can consist of multiple transaction. In the second case the order needs to be marked on the queue as being processed. Only once the processing is completed in a later transaction can it be deleted.
Let's assume there are multiple agents who are fulfilling orders. Here is an efficient way to do that using the same technology as described for INSERT with an UPDATE statement.
We have select the oldest order which is unassigned (order_id IS NULL). That order has been updated with the local agent_id and the row has then been returned as a query. Note the usage of OLD TABLE here. You can choose either the NEW or OLD transition table for UPDATE operations. Generally the optimizer plan is better when you use the OLD TABLE whenever possible whenever the subject of the UPDATE is not a base table. The plan is very tight:
After the cursor is opened the transaction can immediately be committed. As a result update locks are held a minimal amount of time with no chance of a deadlock.
Deleting an orderOnce the order has been fulfilled it can easily be deleted from the queue by order_id. Alternatively the order can be marked as processed in an extra column.
For the sake of this exercise however, let's assume we want to delete the order from the order table and archive it in a separate table. WITH del AS (SELECT * FROM OLD TABLE(DELETE FROM order WHERE order_id = 1)) SELECT fulfilled What we have built here is a pipeline of actions. First we DELETE the order we have finished processing. But we interrogate the OLD transition table to pass that information on to the order_archive table. Finally we capture the timestamp when the order was fulfilled from the NEW transition table of the order_archive table. Theoretically this could all be written in one nested query. But these statements can be very complex. What if the query contained joins where the table is updated and select from in the same query? What if the same table is modified multiple times? Therefore DB2 restricts NEW TABLE and OLD TABLE to occur in nested queries or in the presence of joins. Placing them into common table expressions however is allowed. Common table expressions provide a natural order. So if there are conflicts DB2 will execute each query in the WITH clause at a time in order of specification. If however there are no conflicts DB2 can provide a very efficient access path:
Note how the DELETE and INSERT are stacked! You can use the same technique also to stack INSERTs. For example to split a staging table across multiple target tables. I'll save that one for another day though since it will introduce another fancy clause..
|
May 09, 2012 |
Frank Fillmore |
IDUG NA DB2 Tech Conference 2012 – Replication TopicsThe International DB2 Users Group (IDUG) DB2 Tech Conference will be held in Denver, USA from May 14 – 18 (that’s next week at the time of this post). There are two events in which I am...(Read more) |
Willie Favero |
The "DB2 for z/OS Exchange" (the old zHotline) has returned(Posted May 9, 2012) If you are a DB2 for z/OS DBA, System Programmer, or Application Programmer, you now have a new resource to add to your list of places to discover information. The DB2 for z/OS Exchange will have much of what you need, being refreshed as frequently...(Read more) |
Susan Visser |
Skills Resources for DB2 for z/OS EnthusiastsThe web is wonderful, but the web is evil! Wonderful because it contains so much content and evil because it contains so much content! It can be overwhelming to navigate through the content and if you don't immediately find what you're looking for, it is very easy to get distracted and forget what you were looking for in the first place.
My intention for this blog entry is to help those who use the DB2 for z/OS products find skills resources that are specific to you. I hope you find this content helpful!
IBM Data Management MagazineThe next generation of IBM Data Management magazine is available for you to read online. It has many great articles, including regular columns by Bonnie Baker and Robert Catterall.
Version 10 books:So far, two books have published to support DB2 V10... but there are more coming.
Version 9 books:Version 9 is still being used by many, so you may find this book useful as well:
Flashbooks:"Flashbooks" are small-sized books that have fewer than 150 pages, and have easy-to-read messages about products, solutions, or technology. Flashbooks are published to coincide with conferences such as IBM's Information on Demand Conference or IDUG. The huge quantity of messages and content delivered at such conferences makes it difficult for attendees to retain all the key messages. Flashbooks are designed to contain the key messages IBM experts want you to take away with you. Flashbooks are handed out in print format at conferences and other events, are available for free in ebook format from this site and can be purchased from amazon.com or other online bookstores.
Redbooks:The ITSO is always busy creating technical publications to help you deepen your knowledge and get hands on skills with IBM's Information Management products. Here are a few you may wish to look at: DB2
10 for z/OS Technical Overview DB2
10 for z/OS Performance Topics
Find many more on the IBM Redbooks Website.
IDUG NA 2012 -- taking place May 14-18 in Denver Colorado:The IDUG conference taking place in Denver Colorado, May 14 -- 18. This is possibly the third time that the conference is in this location. It is an attendee favourite for many reasons, including micro brew pubs, scenery, great city -- good vibe, restaurants, and ease for many people to get there. For details, see this link:
Full-Day Educational Seminars at the IDUG DB2 Tech Conference The following topics are Select from these topics: DB2 10 for z/OS DBA Certification Crammer Course: Susan Lawson,
YL&A Recommended Best Practices from Customer DB2 Health Check Studies:
John Campbell, IBM DB2 for z/OS Development I Didn't Know DB2 did THAT!: Bonnie Baker, Bonnie Baker
Corp. CertificationCertification for DB2 is the MOST popular certification program in IBM! Not everyone who uses DB2 is IBM Certified yet, but the version 10 exams are available and is a great place for you to jump on board. Here is an offer for getting certified for half price as well as some information on how to started on your path to getting certified:
BlogsThe DB2 for z/OS community is heavily into blogs. I've had the pleasure to work with Willie Favero and Surekha Parekh on presentations about social media. Here are some of the bloggers you may wish to follow:
My apologies if I missed your blog! Drop me a line and I'll make amends :)
Suggestion... check out who these people are following. That will give you suggestions as to who else you may wish to follow.
CommunitiesCommunities are a way for you to participate in conversations with other like minded people. You'll find lots of resources, news about events, and perhaps access to experts.
Is there More?Yes, there is more. Much more. I didn't even begin to cover the courses offered by IBM Education. I hope what I have provided is helpful and I'll update this page when I have more to add.
Susan |
Ember Crooks |
Parameter Wednesday – DB CFG – pckcacheszDB2 Version This Was Written For 9.7 Parameter Name PCKCACHESZ Where This Parameter Lives Database Configuration How To Check Value > db2 get db cfg for sample |grep PCKCACHESZ Package cache...... |
Antonio Cangiano |
New Release of the Ruby Driver and Rails Adapter for DB2The API team at IBM recently released a new update for the ibm_db gem, which includes both the Ruby driver and the Rails adapter for DB2 (and Informix). This coincides with the release of the latest...(Read more) |
Willie Favero |
The DB2 Analytics Accelerator gets a couple significant Summer enhancements(Posted May 9, 2012) A few months back we (IBM) announced the DB2 Analytics Accelerator V2 that combined all the things we’ve grown to love and expect from System z with the speed of Netezza. It was without a doubt the perfect marriage.. and almost everyone seems to want to hear more about it. ...(Read more) |







(based on 7 reviews)
(based on 3 reviews)