![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
Compile errors encountered while assembling the Static SQL handler could be due to the following:
• If you use the extraction method to obtain the DB2 table definition (refer to Task A Choose a Method to Obtain the DB2 Table Definition) and change the actual DB2 table definitions without refreshing the TIBCO Object Service Broker tables containing the DB2 table definition information
• If you request an INSERT and a required DB2 field (NOT NULL) is not included in the TIBCO Object Service Broker DB2 table definition
• If you saved the TIBCO Object Service Broker DB2 table definition from the Table Definer and invalidated the Static SQL for this table. This occurs regardless of whether you made changes to the definition.
Execute @STATICSQL (re-selecting the table) to reset the status for this table.
• If the assembler code (member prefix/suffix) that contains the Static SQL statements generated when you ran @STATICSQL was manually modified.The TIBCO Object Service Broker DB2 table definition must first qualify for Static SQL. If the Static SQL handler was generated, assembled, linked, and bound, and the TIBCO Object Service Broker table definition was not saved using the Table Definer since the handler was generated, Static SQL can be used.If the TIBCO Object Service Broker DB2 table definition qualifies for Static SQL, the access you are attempting is compared to the corresponding Static SQL handler for the same selection. If the access is a GET or a FORALL with no selection criteria, a static sweep cursor is used. If the access (GET, FORALL, INSERT, DELETE, or REPLACE) you are attempting is found in the Static SQL handler, it is performed using Static SQL.If the access is a GET or FORALL and is not found in the Static SQL handler, the selection criteria is examined. If a primary key equality or range cannot be extracted from the selection criteria so that it identifies a superset of the resulting set, Dynamic SQL is used. If it can be extracted and is found in the Static SQL handler, Static SQL is used (using this primary key equality or range as selection); otherwise, Dynamic SQL is used.
When accesses are logged, if a primary key range or equality can be extracted from the selection criteria, it is also logged.To promote an application that uses Static SQL from your source system to a target system, complete the following steps:
2. Extract the necessary occurrences of the TDS tables @SS_ACCESSES and @SS_SELECTION and promote them to the target system.
3. If the server ID on the target system is different than on the source system, modify the target server ID for each TIBCO Object Service Broker DB2 table in your application to match the source. For details, see Dynamically Changing Gateway Parameters.
4. If the DB2 Owner, DB2 Tablename, or DB2 Location on the target system are different than on the source system, modify the table @DB2TABLES accordingly.
5. Attach and start a Gateway that has the new server ID to the target system.
6. Use the @STATICSQL tool to regenerate the Static SQL for the required tables on the target TIBCO Object Service Broker system and the target DB2 subsystem.
7. Pre-compile, assemble, and link the generated static SQL assembler modules to the DB2 subsystem.
You do not have to relog your TIBCO Object Service Broker DB2 access statements.TIBCO Object Service Broker Managing Deployment for more information on promoting objects.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |