Invokes a procedure stored at the location of a database. Also known as the Database Application Remote Interface (DARI). The server procedure executes at the location of the database, and returns data to the client application.
The application programmer designs the program to run in two parts, one on the client and the other on the server. The server procedure at the database runs within the same transaction as the client application. If the client application and the server procedure are on the same node, the server procedure is executed locally.
Note: | This command has been replaced by the SQL CALL statement (see the SQL Reference). There is also support for CALL within the CLP for cataloged stored procedures. |
Authorization
CONNECT privilege on a database.
Required Connection
Database
>>-INVOKE--program-name----+---------------------------+------->< '-USING--server-input-data--'
Note: | Do not use INVOKE to call server procedures that use input or output SQLDA structures, including server procedures that return data. For more information, see the Application Development Guide. |
Command Parameters
db2 invoke foo
will load the DARI library named FOO and execute the function routine FOO() within the library.
The database manager will find the DARI libraries in the default directory $HOME/sqllib/function of the instance owner.
Note: | To support portability between various versions of DB2 products, the ! delimiter can be replaced by the backslash (\) delimiter. |