![]() ![]() |
XIB MBC invalid database connections failure |
Sep 27 2009, 01:55 AM
Post
#1
|
|
|
Visitor ![]() Group: Members Posts: 5 Joined: 23-June 09 Member No.: 576 |
My XIB integration is like this:
Receive Activity->Coded MBC(this mbc open the input EDI message, parse it, and open a database connection and put the data into database). But if i input several input files for the receive activity, around 10% of the time, the MBC process those files in parallel, and most of the cases of the 10%, the MBC will fail cause of DATABASE connection error. part of the mbc: Database OPEN "user/password@SID" DBID $DBID, ..... .... DATABASE EXECUTE "COMMIT" According to the Trace view log, the MBC tries to open the DATABASE almost the same time, and if print the $DBID, it will show two different values, most of the time, the first one is 0, and the next one is a positive integer. But for the latter one, when EXECUTE "COMMIT", the MBC will through exectpion: DATABASE not open. Also I check the input file, there is no error of the file, cause if i input these files one by one, there will be no error. It only SOMETIMES happens when the MBC processing several input file.(not always happen).
error.JPG ( 341.44K )
Number of downloads: 14Please Help, this is stange and important for me. Thank you everyone. Jim |
|
|
|
Sep 29 2009, 09:20 AM
Post
#2
|
|
|
Group: Members Posts: 31 Joined: 6-November 08 Member No.: 82 |
Hi bluefisher80,
What version of XIB are you using? On XIB 2.1.1 it is advised to always add "DBID $DBID" to EVERY DATABASE/EXEC SQL statement, e.g: DATABASE OPEN "db openstring" DBID $DBID; ... DATABASE EXECUTE "db command" DBID $DBID; ... DATABASE CLOSE DBID $DBID; or: DATABASE OPEN "db openstring" DBID $DBID; ... EXEC SQL DBID $DBID BEGIN WORK ... EXEC SQL DBID $DBID INSERT INTO blablabla... ... EXEC SQL DBID $DBID COMMIT WORK; ... DATABASE CLOSE DBID $DBID; I hope this helps. |
|
|
|
Sep 30 2009, 02:51 PM
Post
#3
|
|
|
Visitor ![]() Group: Members Posts: 5 Joined: 23-June 09 Member No.: 576 |
Hi bluefisher80, What version of XIB are you using? On XIB 2.1.1 it is advised to always add "DBID $DBID" to EVERY DATABASE/EXEC SQL statement, e.g: DATABASE OPEN "db openstring" DBID $DBID; ... DATABASE EXECUTE "db command" DBID $DBID; ... DATABASE CLOSE DBID $DBID; or: DATABASE OPEN "db openstring" DBID $DBID; ... EXEC SQL DBID $DBID BEGIN WORK ... EXEC SQL DBID $DBID INSERT INTO blablabla... ... EXEC SQL DBID $DBID COMMIT WORK; ... DATABASE CLOSE DBID $DBID; I hope this helps. Hi, Rhenus ICT Services Thanks for your advice, i will try them after the vacation. I am using xib2.1.1 sp2, also i will patch sp3 when i get my hands back to my server. I read that the SP3 has 'Some kind of database pool', i think that maybe let me avoid the problem. Best regards, Jim |
|
|
|
May 5 2010, 10:38 PM
Post
#4
|
|
|
Visitor ![]() Group: Members Posts: 2 Joined: 6-March 09 Member No.: 379 |
Hi bluefisher80,
From the description of your problem, i believe the issue is with simultaneous processing of input messages and the MBC written is not catered to run in multisession environment. There are 2 ways to solve this problem: 1. Change the max number of session session of the HMT to 1. In XIB HMT configuration, there is a setting call max number of session. It is by default 0 (means unlimited session). Changing it to 1 will ensure sequential pickup and execution of messages, hence indirectly resolving the db issue. 2. Change your MBC to cater for multiple session execution environment Within the MBC, you have to take care not to declare the $DBID variable globally. It should be a local variable within the processmessage statement. |
|
|
|
![]() ![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
|
Lo-Fi Version | Time is now: 30th July 2010 - 01:04 PM |
Skin designed by IPB Forum Skins
Expand / Collapse Navigation



Sep 27 2009, 01:55 AM





