Stored Procedures

Stored procedures are another server-side feature of DB2 that you should consider using to consolidate database programming code and increase performance. They allow you to download your database operations into libraries that are called locally by a DB2 server instance (see Figure 8.4). Thus, there are two pieces to application code that uses a stored procedure. You must write the stored procedure itself in a supported language (C or Java) or as an SQL Stored Procedure. In addition, you must write client-side code that will call the stored procedure. Writing a database application that issues a CALL statement to run the stored procedure performs this task. There are several features in DB2 stored procedures that you can benefit ...

Get DB2® Universal Database™ v8 Application Development Certification Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.