SQL package support
The i5/OS® operating system supports SQL packages. The object type is *SQLPKG.
The SQL package contains the control structures and access plans necessary to process SQL statements on the application server when running a distributed program. An SQL package can be created when:
- The RDB parameter is specified on the CRTSQLxxx command and the program object is successfully created. The SQL package will be created on the system specified by the RDB parameter.
If the compile is unsuccessful or the compile only creates the module object, the SQL package will not be created.
- Using the CRTSQLPKG command. The CRTSQLPKG can be used to create a package when the package was not created at precompile time or if the package is needed at an RDB other than the one specified on the precompile command.
The Delete SQL Package (DLTSQLPKG) command allows you to delete an SQL package on the local system.
An SQL package is not created unless the privileges held by the authorization ID associated with the creation of the SQL package includes appropriate authority for creating a package on the remote system (the application server). To run the program, the authorization ID must include EXECUTE privileges on the SQL package. On the i5/OS operating system, the EXECUTE privilege includes system authority of *OBJOPR and *EXECUTE.
- Valid SQL statements in an SQL package
Programs that are connected to another server can use any of the SQL statements except the SET TRANSACTION statement.
- Considerations for creating an SQL package
When you create an SQL package, consider these aspects.
Parent topic:
Distributed relational database function and SQL
Related reference
Create SQL Package (CRTSQLPKG) command