Customizing and binding SQLJ profiles for updated SQLJ files (DB2)

If you are using DB2®, you can use the DB2SQLJCustomize wizard to generate and run an SQLJ customization script in your SQLJ-enabled project. Running a customization script adds run-time information to the SQLJ serialized profiles in your project that is specific to DB2 and binds the profiles to the database. After you customize and bind the SQLJ profiles in a project, you can customize and bind only the profiles that are associated with an updated SQLJ file in the project.

Before you begin

Ensure the following requirements are met:
  • Add SQLJ support to the project.
  • Translate the SQLJ files to Java code. The translation process creates the SQLJ profiles.
  • To customize and bind the SQLJ profiles that are associated with an updated SQLJ file, you must customize and bind the SQLJ profiles in the project.
  • To only bind the SQLJ profiles, you must have customized the SQLJ profiles previously.

Procedure

To customize and bind the SQLJ profiles that are associated with an updated SQLJ file:

Choose one of the following options, based on whether you want to change the settings that you used for customizing and binding the SQLJ profiles in the project:
Option Perform these steps
To change the customization settings
  1. In the Java perspective, open the Package Explorer view.
  2. Right-click the Java project that contains SQLJ file, and then click Customize/Bind SQLJ Profiles on the pop-up menu.
  3. On the pages of the DB2SQLJCustomize wizard, change the necessary customization settings.
  4. On the Package Targets page of the wizard, select the packages that are associated with the SQLJ profiles for the SQLJ file, and then click Run.
If you do not want to change the customization settings
  1. In the Java perspective, open the Package Explorer view.
  2. Right-click the SQLJ file, and then click Customize SQLJ Profiles on the pop-up menu.

Results

The progress and results of the customize and bind processes are shown in the Console view. By default, this view is not shown. To see the progress and results in the Console view:
  • If the Console view is open in the workbench, click the Console tab.
  • If the Console view is not open in the workbench, click Window > Show View > Console.
You can set a preference to show the Console view automatically.

Feedback