× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



... we are talking about DB2 and its dialects: All static sql needs a SQL package, for local programs on DB2/400, it's part of the SQLRPG Programm (COBOL as well), the package contains access plans and might contain other dataabase related code. It's created under the covers by the precompiler and refreshed automatically, when needed. As a result of this, you won't have to deal with packages for local access of the database with embedded SQL.

For programms accessing a remote database via DRDA (connect statement within embedded SQL) you would need a SQL package at the remote database. It could be created by CRTSQLPKG or implicit by CRTSQLRPGI, specifying the remote database. In this case you would have to recreate the SQL package at compiletime, if the package is missing, it would be impossible to access this remote database with the programm.

Dynamic SQL (STRSQL, ODBC, JDBC, CLI) does not need packages.

Some drivers support so called extended dynamic package support to cache some access plans, in the hope to speed up SQL access and IBM recommended for a long time to use this. It works as all caches: Good for high hitrates, bad for low hitrates and catstrophic for all one time ad hoc queries. The cache could be cleared by deleting one of these packages, it would be recreated by the driver. Best choice would be to disable extended dynamic, its useless in most cases anyway and access plans are cached within the database and the driver job anyway.

D*B

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.