sql package

Tags:
AS/400
Development
Would someone explain to me what the object type *SQLPKG is and how they are created. Thanks in advance.
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

The OS/400 program supports an object called an SQL package. (OS/400 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.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Jklipa
    These mysterious objects seem to be created when MS Access is used to access data on the DB2 database or when using iSeries Access Data Transfer as well... That last explanation sounded like it came right out of a manual... It was very descriptive but did not help me understand what they are, how they are created or what they are used for or if they can be removed from our box... Thanks.
    0 pointsBadges:
    report
  • JohnBussert
    The answer in 1 is actually correct - but it helps if you understand what is happening with a package. It stores the constructs that the sql optimizer uses to know what the various sql statements in the package do. This speeds up the execution as the system does not need to re-create the optimization plans. When you use MS Access - or other ODBC connection - a package will get created for the program on that connection. You can actually view what is in a package - using ops navagator - drill down into the databases and one of your data libraries for SQL Packages (if you are using a newer version of ops nav) - then right click and go to Explain. You will see your sql statements either from the compile, or from actual execution (as in MS Assess). If that does not confuse you enough - I can try again...
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: