WAS v8.5 > Reference > SetsSQLJ profiles and pureQuery bind files settings page
Use this page to do customization and binding for the SQLJ profiles for DB2 that are included in this application. We can also use this page to do binding for pureQuery bind files in the application. We can view SQLJ profiles for other database types, but we cannot change these profiles. PureQuery bind files are only valid for DB2. Use SQLJ or pureQuery to develop data access applications that connect to DB2 databases. SQLJ is a set of programming extensions that enable a programmer to use the Java programming language to embed statements that provide SQL database requests. PureQuery provides an alternate set of APIs that can be used instead of JDBC to access the DB2 database.
To view this dmgr console page, click Applications > Application Types > WebSphere enterprise applications > application_name > SQLJ profiles and pureQuery bind files.
Advantages of developing applications with SQLJ include improved performance and a shorter, more efficient development cycle. With SQLJ, we can:
- Improve performance using static SQL statements.
- Reduce the development cycle by:
- Writing less code with the simpler SQLJ syntax, which reduces the amount of code required to execute statements, and set and retrieve parameters.
- Detecting programming errors earlier in the development phase with the online check function, which performs data type and schema validation. Activate this function by running it as an option with the db2sqljcustomize command. See the DB2 documentation for a complete description of the SQLJ customize command.
DB2 pureQuery run time is an alternative set of APIs to JDBC or SQLJ. Advantages of developing applications with pureQuery include allowing SQL execution to be either dynamic or static. In addition to improved performance using static SQL statements, pureQuery has better problem determination and diagnosis because it allows for errors at the DB2 server to be related back to application artifacts rather than to SQL that was generated by an application generator.
Customize and bind profiles
The application server processes the SQLJ profiles that you select from this application.
This selection does not apply to pureQuery. If selected, this option is ignored when processing pureQuery bind files.
By default, one DB2 package is created in the database for each isolation level. The customization process augments the profile or profiles with information that is specific for the DB2 database for use at run time. Typically, the customization process should run after the SQLJ application has been translated and before the application is started. If we do not run the customization step, the SQLJ application uses dynamic SQL like a JDBC application.
Binding DB2 SQLJ profiles involves the process of binding the customized SQLJ profiles to the DB2 database.
Bind packages
The application server binds the SQLJ profiles that you select to the DB2 database server.
This selection does not apply to pureQuery. If selected, this option is ignored when processing pureQuery bind files.
Bind packages from the SQLJ application that have already been customized.
Select and order the profiles to customize/bind
Profiles to process from the list provided.
- Select a profile or group of profiles from the Available profiles, and click Add to add the profile that is selected to Selected Profiles.
- Select a profile or group of profiles from the Selected Profiles, and click Remove to add the profile that is selected to Available profiles.
When SQLJ or pureQuery profiles have been added to Selected Profiles, select profiles from that list and use Move Up or Move Down to change the order in which the profiles are processed.
Customize/bind the selected SQLJ profiles as a group
The application server creates a .grp file containing the SQLJ profiles selected.
This selection does not apply to pureQuery. If selected, this option is ignored when processing pureQuery bind files.
When you click OK, there is an option on the next page to download the .grp file.
Use a profile group file to specify profiles to customize/bind
Specifies a profile group file from the local file system to customize or bind.
Database URL
Specifies the URL of the database to which the profile or profiles are bound.
The typical syntax is:
jdbc:db2://host_name:port_name/database_name
User
User ID for the database administrator on the server where the database is located.
Password
Password for the database administrator on the server where the database is located.
Additional options
Specifies additional options to use during the customization and bind processes.
Options for pureQuery binding uses the following syntax:
-bindoptions "BLOCKING NO"
For more information about pureQuery bind options, refer to the DB2 pureQuery Bind Utility topic.
Class path
Class path where the sqlj.zip, and db2jcc.jar or db2jcc4.jar files for SQLJ are located. Class path where the pdq.jar, pdqmgt.jar, db2jcc.jar, and db2jcc_license_cisuz.jar files for pureQuery are located.
Related
Deploy SQLJ applications
Customize and binding profiles for SQLJ applications