Intelligent Enterprises of the 21st Century

   
  
• Table of Contents
• Index
• Examples
DB2 ® SQL PL, Second Edition: Deployment and Advanced Configuration Essential Guide for DB2 ® UDB on Linux., UNIX™, Windows ® , i5/OS™, z/OS ®
By Zamil Janmohamed, Clara Liu, Drew Bradstock, Raul Chong, Michael Gao, Fraser McArthur, Paul Yip
 
Publisher: Prentice Hall PTR
Pub Date: November 15, 2004
ISBN: 0-13-147700-5
Pages: 576
   

   Copyright
   IBM Press
      On Demand Computing Books
      DB2 Books
      More Books from IBM Press
   Contributors
   Acknowledgments
   About the Authors
   Foreword
        Chapter 1.  Introduction
      Installing DB2
      History of Stored Procedures
      A Brief Introduction to Stored Procedures, Triggers, and Functions
      What's New in the Second Edition
      Book Conventions
        Chapter 2.  Basic SQL Procedure Structure
      The CREATE PROCEDURE Statement
      The SQL Procedure Body Structure
      Bringing It All Together Example
      DB2 UDB for iSeries Considerations
      DB2 UDB for zSeries Considerations
      Summary
        Chapter 3.  Overview of SQL PL Language Elements
      DB2 Data Types
      Large Objects
      Choosing Proper Data Types
      Working with User-Defined Distinct Types
      Data Manipulation
      Working with Generated Columns
      Working with Identity Columns and Sequence Objects
      Platform Portability Considerations
      Summary
        Chapter 4.  Using Flow of Control Statements
      Compound Statements
      Conditional Statements
      Looping Statements
      Transfer of Control Statements
      Summary
        Chapter 5.  Understanding and Using Cursors and Result Sets
      Using Cursors in SQL Procedures
      Positioned Delete
      Positioned Update
      Selecting Data from UPDATE, INSERT, or DELETE Statements
      Cursor Behavior with COMMIT/ROLLBACK
      Using Cursors to Return Result Sets
      Returning Multiple Result Sets
      Cursors and Locking
      DB2 UDB for iSeries Considerations
      Summary
        Chapter 6.  Condition Handling
      Basic Error Checking: SQLCODE and SQLSTATE
      Condition Handlers
      Custom Errors and Error Messages
      Processing Results from Called Procedures
      Bringing It All Together
      DB2 UDB for iSeries Considerations
      DB2 UDB for zSeries Considerations
      Summary
        Chapter 7.  Working with Dynamic SQL
      PREPARE and EXECUTE: The Two Phases of Any SQL Statement
      Dynamic SQL Versus Static SQL
      Restrictions and Considerations
      Using Dynamic SQL with EXECUTE IMMEDIATE
      Escaping Single Quotes (')
      Reusing Dynamic SQL Statements with PREPARE and EXECUTE
      Using Dynamic SQL in Cursors
      Dynamic CALL Statements
      Authorization Consideration
      Summary
        Chapter 8.  Nested SQL Procedures
      Basic Nested SQL Procedures
      Passing Parameters Between Nested SQL Procedures
      Returning Values from Nested SQL Procedures
      Returning Result Sets from Nested SQL Procedures
      Receiving Results from a Procedure in a Trigger
      Levels of Nesting
      Security
      Summary
        Chapter 9.  User-Defined Functions and Triggers
      The CREATE FUNCTION Statement
      User-Defined Functions by Examples
      The CREATE TRIGGER Statement
      Triggers by Examples
      Considerations for Invoking SQL Procedures from UDFs and Triggers
      DB2 for iSeries Considerations
      DB2 for zSeries Considerations
      Summary
        Chapter 10.  Leveraging DB2 Application Development Features
      Leveraging Advanced SQL
      Declared Global Temporary Tables
      Working with Save Points
      Sequence Objects
      Summary
        Chapter 11.  Deploying SQL Procedures, Functions, and Triggers
      Deploying on Linux, UNIX, and Windows
      Deployment Considerations for DB2 for zSeries
      Common Deployment Considerations for LUW and zSeries
      Deploying in DB2 UDB for iSeries
      Summary
        Chapter 12.  Performance Tuning
      Performance Considerations for LUW
      DB2 for iSeries Considerations
      DB2 for zSeries Considerations
      Summary
        Chapter 13.  Best Practices
      Table and Index Best Practices
      Best Practices for Easier Code Maintenance
      Best Practices for Performance
      Working with Result Sets
      Precompile Options on iSeries
      Summary
        Appendix A.  Getting Started with DB2
      Getting Started with DB2 UDB for LUW
      Getting Started with DB2 UDB for iSeries
      Getting Started with DB2 UDB for zSeries
      Summary
        Appendix B.  Inline SQL PL for DB2 UDB for Linux, UNIX, and Windows
      Dynamic Compound Statement
      Stand-Alone Code
      Choosing Between Dynamic Compound Statements and SQL Procedures
      Summary
        Appendix C.  Building from the Command Line
      Configuring the Build Environment
      Building SQL Procedures
      Building SQL Procedures in DB2 UDB for iSeries
      Building SQL Procedures in DB2 for zSeries
      Summary
        Appendix D.  Using the DB2 Development Center
      Installing the DB2 Development Center
      DB2 for Windows
      DB2 for Linux and UNIX
      Using the Development Center for the First Time
      Development Center Views
      Customizing the Development Center
      Running Procedures
      Stored Procedure Run Settings
      Debugging Stored Procedures
      Debugging Nested Stored Procedures
      Working with Projects
      Importing Stored Procedures
      DB2 for iSeries Considerations
      DB2 for zSeries Considerations
      Environment Settings
      Developing SQL Stored Procedures from the Development Center
      The Project and Server Views
      Debugging DB2 for zSeries SQL Stored Procedures
      Summary
        Appendix E.  Security Considerations in SQL Procedures
      Privileges
      Using Stored Procedures in a Production Environment
      DB2 for zSeries Considerations
      The DEFINE Behavior
      The INVOKE Behavior
      Common Attribute Values for the DEFINE and INVOKE Behaviors
      Simplifying Authorization
      Summary
        Appendix F.  DDL
      Creating the SAMPLE Database on LUW
      Creating the SAMPLE Database on iSeries
      Creating the SAMPLE Database on zSeries
      SAMPLE Database DDL: Script 1 sampleDDL_1.db2
      DDL for Additional Database Objects: Script #2 sampleDDL_2.db2
        Appendix G.  Additional Resources
      IBM Redbooks
      Certification
      Education
      Books
      Additional Websites
      Email Services and Periodicals
      User Groups and Conferences
        Appendix H.  Sample Application Code
      Receiving Result Sets in Java
      Receiving Result Sets in a C or C++ Application
      Receiving Multiple Result Sets in Java
      Receiving Multiple Result Sets in a C or C++ Application
       CD-ROM Warranty
   Index

Категории