Category Archives: DB2 luw , DB2 9.7 , DB 9.1

Metaprogramming in SQL (Part 4)

In the past three posts, we have written metaprograms to create functions for comparing objects of built-in types, user-defined distinct types, ROW types, and ordinary ARRAY types. In today’s post, we will write a single metaprogram that can create comparison functions for all four. The only obstacle to writing a generic metaprogram for built-in, UDDT, … Continue reading

Metaprogramming in SQL (Part 3)

In the first post in this series, I introduced the concept of metaprogramming in SQL using dynamic SQL and applied the technique to write a procedure that could generate comparison functions that compare two objects of any basic type. In the second post, I expanded the procedure to produce comparison functions that compare two objects … Continue reading

Metaprogramming in SQL (Part 2)

In the last post on this subject, we used dynamic SQL to generalize an integer comparison function into a stored procedure that builds comparison functions of any basic type. This served as a simple example, but did not really offer much benefit over using the ‘=’ operator. In today’s post, I will extend the same … Continue reading

Metaprogramming in SQL (Part 1)

Metaprogramming can feel like magic. You call a function that you neither wrote nor imported from any library and, magically, it comes back with a result. Even more magical is how metaprogramming lets you do otherwise impossible things with your programming language. In “The Art of Metaprogramming”, Jonathan Bartlett’s developerWorks series, he lists three examples … Continue reading

db2top: The Locks screen (video)

Today’s video is a demonstration of the Locks screen of db2top. In the video, I create a lock chain and launch db2top to examine the Application Status, Object Name, Locked By and Lock Count columns for three applications involved in the chain. I then use the Lock Chain screen to visualize the chain:Watch “db2top: The … Continue reading

db2top: The Watch feature

For the second video in this video series, we have a demonstration of the db2top Watch feature. It demonstrates capturing a single application’s SQL, capturing complete database structures to a set of files, and capturing all the dynamic SQL in the cache:Watch “db2top: The Watch feature” directly on YouTube.Popularity: 12% [?]

db2top: Memory screen and db2mtrk (video)

Today’s video is a comparison between the output of the db2mtrk command and the db2top Memory screen. It covers current allocations, high watermarks, and maximum allocations for the instance, database, and application groups of memory pools as well as the repeat mode of db2mtrk.Watch “db2top: Memory screen and db2mtrk” directly on YouTube.Popularity: 14% [?] Related … Continue reading