Thursday, July 24, 2008

[HY000][-901] [IBM][System i Access ODBC Driver][DB2 for i5/OS]SQL0901 - SQL system error.

Jdbodbc.c8352
ODB0000164 - STMT:00 [42S02][-204] [IBM][System i Access ODBC Driver][DB2 for i5/OS]SQL0204 - F9500003_CFRS_RIB in MYSYS type *N not found.
412/580 WRK:Starting jdeCallObject Thu Jul 24 00:19:16.257003 Jdbodbc.c8352
ODB0000163 - wSQLExecute failure. rc=-1
412/580 WRK:Starting jdeCallObject Thu Jul 24 00:19:16.257005 Jdbodbc.c8352
ODB0000164 - STMT:00 [HY000][-901] [IBM][System i Access ODBC Driver][DB2 for i5/OS]SQL0901 - SQL system error.
412/580 WRK:Starting jdeCallObject Thu Jul 24 00:19:16.257008 Jdb_drvm.c1096
JDB9900401 - Failed to execute db request
412/580 WRK:Starting jdeCallObject Thu Jul 24 00:19:16.257010 Jdb_exem.c6094
JDB9900856 - Failed to create/delete DB object for table F9500003.
412/580 WRK:Starting jdeCallObject Thu Jul 24 00:19:16.257012 Jdb_exem.c6212
JDB9900769 - Failed to create DB object for table F9500003.
412/580 WRK:Starting jdeCallObject Thu Jul 24 00:19:16.257014 Jdb_exem.c6214
JDB9900770 - If it happens that table F9500003 had this object topic before, this topic was deleted and needs DBA to recover it.
412/580 WRK:Starting jdeCallObject Thu Jul 24 00:19:16.257035 jdb_cfr.c505
JDB9900611 - Failed to create trigger for table F9500003

The joblog hints about the probable inconsistency between the system catalog and the object[existence] in the library.

Cause . . . . . : The trigger operation for file F9500003 in library MYSYS, for trigger F9500003_CFRS_RIB in library MYSYS, failed because of errors.

The operation was 1. The reason code is 6.

The operation codes and their meanings are as follows:

1 - Add a trigger 2 - Remove a trigger 3 - Change a trigger 4 - Create an SQL trigger program 5 - Register the trigger with Cross Reference 6 - Rename a trigger

The reason codes and their meanings are:

01 - Trigger name F9500003_CFRS_RIB already exists for library MYSYS. 02 - Maximum number of triggers has been exceeded for file. 03 - QTEMP was specified for either the file's library, the trigger program's library, or the trigger name's library. 04 - The Auxilary Storage Pool (ASP) of library MYSYS does not match the ASP of library MYSYS. 05 - Specified trigger time or trigger event is incorrect.

06 - Cross Reference failed with return code X'10A3' and diagnostic code 0.

07 - Trigger F9500003_CFRS_RIB in library MYSYS not found for file. 08 - Error generating or altering trigger name, maximum attempts exceeded. 09 - Maximum trigger ordinal number has been exceeded. 10 - Cannot create SQL trigger program. 11 - Cannot delete SQL trigger program *N in library *N. 12 - The CRTPGM command does not exist on the system. 13 - User not authorized. 14 - File has no triggers.

Recovery . . . : Do one of the following based on the reason code shown, and then try the request again.

01 - Either remove the trigger using the Remove Physical File Trigger (RMVPFTRG) command or SQL DROP TRIGGER statement, or specify a different trigger name. 02 - Optionally, remove one of the existing triggers using the RMVPFTRG command or SQL DROP TRIGGER statement. 03 - Specify a library other than QTEMP. 04 - Either delete the file and create it on the ASP of library MYSYS, or add the trigger to a library that has the ASP of library MYSYS. To determine the ASP of a library, use the Display Library (DSPLIB) command. 05 - Use the Display File Description command (DSPFD) to determine the correct trigger time and trigger event for the specified trigger name.

06 - Use the Reclaim DB Cross-Reference (RCLDBXREF) command, specifying OPTION(*CHECK), to determine the correct recovery. If the problem persists, report this problem using the Analyze Problem (ANZPRB) command.

07 - Specify a different trigger name, trigger time, or trigger event, or specify a different file. 08 - Specify a different trigger name. 09 - Remove all the triggers on this file using the RMVPFTRG command, and then add them back using the Add Physical File Trigger (ADDPFTRG) command. 10 - See previous messages. 11 - Delete the program using the Delete Program (DLTPGM) command. 12 - Ensure the CRTPGM command exists on the system when the trigger program is created. 13 - Get *USE authority to the CRTPGM command. 14 - Specify a different file.
More about RCLDBXREF

Friday, July 4, 2008

[JDBj-SPEC DATA SOURCE] and JDBJ.ini

The [JDBj-SPEC DATA SOURCE] section in jdbj.ini will decide whether the serialized object tables [F989998,F989999] have to be read from OCM or a overridden one.
  1. If the total section is commented out, then these tables are read from the dataSource specified by the OCM mappings.
  2. If the name given for the field 'name=' matches a datasource in the Datasource master table[F98611],then other details like the database type, database name,TCP/IP port etc are fetched from the dataSource master table.
  3. If the name doesn't match any existing datasource, then the properties are read from the other fields mentioned in the section[JDBj-SPEC DATA SOURCE].
Example1:
#[JDBj-SPEC DATA SOURCE]
#name=System - 812
Here the section is commented.So OCM will be used

Example2:
[JDBj-SPEC DATA SOURCE]
name=System - 812
databaseType=I
server=HPISER1
Here suppose 'System - 812' matches an existent datasource in DataSource master table, then the rest details are read from there.This is just for flexibilty and to reduce possible errors we make when the datasource details are entered manually.
If the 'name=' doesn't match any datasource in the F98611 table ,what you have filled in the rest of the section matters.