DB20000I The SQL command completed successfully.
db2 =>
Stored procedure fundamentals
Figure 10 1 illustrates the creation process for stored procedures and the objects
a stored procedure is composed of:
The
create procedure
command invokes the SQL precompiler, which
replaces SQL statements with appropriate API calls. The result is for this
example a C source file with the extension
.sqc.
During the further compilation of the stored procedure, it is split into a file
containing the executable code plus a
bind
file, which ultimately is stored in
DB2 UDB as an SQL package.
Code level consistency between the
executable
object and the
package
object
stored within the db2 engine is ensured by a
consistency token,
which is
exchanged on every execution.
library
C file
create
(.c)
procedure
embedded
...
C program
...
(.sqc)
bind
file
DB2 UDB
(.bnd)
package
Figure 10 1 Creating stored procedures
Stored procedures can get quite complex. For details please refer to
Application
Development Guide: Programming Server Applications
, SC09 4827.
The basic form a stored procedure looks like:
CREATE PROCEDURE proc [( {optional parameters} )]
[optional procedure attributes]
322
MySQL to DB2 UDB Conversion Guide
footer
Our partners:
PHP: Hypertext Preprocessor Cheap Web Hosting
JSP Web Hosting
Ontario Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Java Hosting
Cheapest Hosting
Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved