Once you have written a stored procedure or two you'll very soon want to debug it. There's nothing like stepping through the code line-by-line to try to find out what is going wrong. Thankfully IBM Data Studio provides a very good debugger for SQL stored procedures.
In this entry we will look at the use of IBM Data Studio in the development life cycle SQL Procedure Language (SQL PL) stored procedures on both DB2 for z/OS as well as DB2 LUW. A “cheat sheet” for some of the more common SQL PL commands is found on the last page of this article.
With each new release, DB2 is getting smarter and smarter. However, DB2 is not yet clairvoyant enough to understand the intentions of all queries and turn them into optimal forms. What’s the bottom line? Do you need to worry about how you code? The answer is yes, but not as much as in the past.
In this comprehensive overview of DB2 10, for z/OS Lori Ann Galluzzo goes through the features of DB2 10 in great detail. Each feature is discussed, along with how and when to take advantage of the feature, as well as some pitfalls and things to watch out for.
We use Explain to find out the access path for a query. Jim Dee, from BMC shows you how you can compare the access path with previous versions of the query or package – comparing the estimated costs, and identifying those that have changed with a rebind.