473,230 Members | 1,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,230 software developers and data experts.

call db2dari proc pb on V8.1 FP4

Dear all,

I have simulated the windows MULTI application with a java program calling
the SQLTP1DL proc referenced as DB2DARI application, on Linux Intel or
ZLinux. If the proc is NOT FENCED, there is no pb and the program works
fine. If either the proc is FENCED, or FENCED THREADSAFE, I get a SQL1042C,
or the instance crashes on ZLinux (V8.1 FP4).

The proc does a return(SQLZ_HOLD_PROC):
[db2inst1@gamma cf41]$ /opt/IBMJava2-131/bin/java sqltp1ri 1

Call stored procedure SQLTP1DL for thread 1

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/LINUX] SQL1042C An
unexpected system error occurred. SQLSTATE=58004

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGe
nerator.java:273)

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGe
nerator.java:215)

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_r eturn_code(SQLExceptionGen
erator.java:440)

at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2 (DB2PreparedStatement.java
:2199)

at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute( DB2PreparedStatement.java:
3969)

at sqltp1ri.main(sqltp1ri.java:39)

The proc does a return(SQLZ_DISCONNECT_PROC):

[db2inst1@gamma cf41]$

Call stored procedure SQLTP1DL for thread 1

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/LINUX] SQL1131N DARI
(Stored Procedure) process has been terminated abnormally. SQLSTATE=38503

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGe
nerator.java:273)

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGe
nerator.java:215)

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_r eturn_code(SQLExceptionGen
erator.java:440)

at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2 (DB2PreparedStatement.java
:2199)

at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute( DB2PreparedStatement.java:
3969)

at sqltp1ri.main(sqltp1ri.java:39)

[db2inst1@gamma cf41]$
Do you have any idea if I could change a parameter to make it work - all the
pb seems to be at the return code level ?

Thanks for your help,

Jean-Marc

The java program:

class sqltp1ri
{
public static void main(String argv[])
{
Connection con = null;
int loop = 1;

try
{
// Get a connection
// Class.forName("com.ibm.db2.jcc.DB2Driver").newInst ance();
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").ne wInstance();

if (argv.length == 1) {
con = DriverManager.getConnection("jdbc:db2:tp1c1");
} else if (argv.length == 3) {
con = DriverManager.getConnection("jdbc:db2:tp1c1", argv[1],
argv[2]);
}
con.setAutoCommit(false);
int param = Integer.valueOf( argv[0] ).intValue();

System.out.println("Call stored procedure named SQLTP1DL for thread "
+ argv[0]);

String sql = "CALL SQLTP1DL (?, ?, 10, ?)";
CallableStatement callStmt = con.prepareCall(sql);

while (loop <= 50) {

// set input parameters
callStmt.setInt(1, param);
callStmt.setInt(2, param);
callStmt.setInt(3, param);

// call the stored procedure

callStmt.execute();

// roll back any changes to the database
con.commit();
loop+=1;
}
callStmt.close();
con.close();
}
catch (Exception e)
{
try
{
con.rollback();
con.close();
}
catch (Exception x)
{ }

e.printStackTrace();
}
} // end main

}
Nov 12 '05 #1
4 3211
In fact, it appears the db2dari stored procedure (fenced) call makes no
problem if I do it from the db2 clp. My problem is the call from the java
program works if the stored proc is NOT FENCED, but fails if the stored proc
is FENCED.

Any idea ?

"Jean-Marc Blaise" <no****@nowhere.com> a écrit dans le message de
news:br**********@news-reader5.wanadoo.fr...
Dear all,

I have simulated the windows MULTI application with a java program calling
the SQLTP1DL proc referenced as DB2DARI application, on Linux Intel or
ZLinux. If the proc is NOT FENCED, there is no pb and the program works
fine. If either the proc is FENCED, or FENCED THREADSAFE, I get a SQL1042C, or the instance crashes on ZLinux (V8.1 FP4).

The proc does a return(SQLZ_HOLD_PROC):
[db2inst1@gamma cf41]$ /opt/IBMJava2-131/bin/java sqltp1ri 1

Call stored procedure SQLTP1DL for thread 1

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/LINUX] SQL1042C An
unexpected system error occurred. SQLSTATE=58004

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGe nerator.java:273)

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGe nerator.java:215)

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_r eturn_code(SQLExceptionGen erator.java:440)

at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2 (DB2PreparedStatement.java :2199)

at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute( DB2PreparedStatement.java: 3969)

at sqltp1ri.main(sqltp1ri.java:39)

The proc does a return(SQLZ_DISCONNECT_PROC):

[db2inst1@gamma cf41]$

Call stored procedure SQLTP1DL for thread 1

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/LINUX] SQL1131N DARI
(Stored Procedure) process has been terminated abnormally. SQLSTATE=38503

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGe nerator.java:273)

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGe nerator.java:215)

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_r eturn_code(SQLExceptionGen erator.java:440)

at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2 (DB2PreparedStatement.java :2199)

at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute( DB2PreparedStatement.java: 3969)

at sqltp1ri.main(sqltp1ri.java:39)

[db2inst1@gamma cf41]$
Do you have any idea if I could change a parameter to make it work - all the pb seems to be at the return code level ?

Thanks for your help,

Jean-Marc

The java program:

class sqltp1ri
{
public static void main(String argv[])
{
Connection con = null;
int loop = 1;

try
{
// Get a connection
// Class.forName("com.ibm.db2.jcc.DB2Driver").newInst ance();
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").ne wInstance();

if (argv.length == 1) {
con = DriverManager.getConnection("jdbc:db2:tp1c1");
} else if (argv.length == 3) {
con = DriverManager.getConnection("jdbc:db2:tp1c1", argv[1],
argv[2]);
}
con.setAutoCommit(false);
int param = Integer.valueOf( argv[0] ).intValue();

System.out.println("Call stored procedure named SQLTP1DL for thread " + argv[0]);

String sql = "CALL SQLTP1DL (?, ?, 10, ?)";
CallableStatement callStmt = con.prepareCall(sql);

while (loop <= 50) {

// set input parameters
callStmt.setInt(1, param);
callStmt.setInt(2, param);
callStmt.setInt(3, param);

// call the stored procedure

callStmt.execute();

// roll back any changes to the database
con.commit();
loop+=1;
}
callStmt.close();
con.close();
}
catch (Exception e)
{
try
{
con.rollback();
con.close();
}
catch (Exception x)
{ }

e.printStackTrace();
}
} // end main

}

Nov 12 '05 #2
A different client, means different types may be getting passed into the
routine. This usually happens for char types, and with dari routines can
result in logic errors when not all types are handled. Dari style sps
should never bring down the instance though...can you post the trap file?

Jean-Marc Blaise wrote:
In fact, it appears the db2dari stored procedure (fenced) call makes no
problem if I do it from the db2 clp. My problem is the call from the java
program works if the stored proc is NOT FENCED, but fails if the stored proc
is FENCED.

Any idea ?

"Jean-Marc Blaise" <no****@nowhere.com> a écrit dans le message de
news:br**********@news-reader5.wanadoo.fr...
Dear all,

I have simulated the windows MULTI application with a java program calling
the SQLTP1DL proc referenced as DB2DARI application, on Linux Intel or
ZLinux. If the proc is NOT FENCED, there is no pb and the program works
fine. If either the proc is FENCED, or FENCED THREADSAFE, I get a


SQL1042C,
or the instance crashes on ZLinux (V8.1 FP4).

The proc does a return(SQLZ_HOLD_PROC):
[db2inst1@gamma cf41]$ /opt/IBMJava2-131/bin/java sqltp1ri 1

Call stored procedure SQLTP1DL for thread 1

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/LINUX] SQL1042C An
unexpected system error occurred. SQLSTATE=58004

at


COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGe
nerator.java:273)

at


COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGe
nerator.java:215)

at


COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_r eturn_code(SQLExceptionGen
erator.java:440)

at


COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2 (DB2PreparedStatement.java
:2199)

at


COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute( DB2PreparedStatement.java:
3969)

at sqltp1ri.main(sqltp1ri.java:39)

The proc does a return(SQLZ_DISCONNECT_PROC):

[db2inst1@gamma cf41]$

Call stored procedure SQLTP1DL for thread 1

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/LINUX] SQL1131N DARI
(Stored Procedure) process has been terminated abnormally. SQLSTATE=38503

at


COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGe
nerator.java:273)

at


COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGe
nerator.java:215)

at


COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_r eturn_code(SQLExceptionGen
erator.java:440)

at


COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2 (DB2PreparedStatement.java
:2199)

at


COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute( DB2PreparedStatement.java:
3969)

at sqltp1ri.main(sqltp1ri.java:39)

[db2inst1@gamma cf41]$
Do you have any idea if I could change a parameter to make it work - all


the
pb seems to be at the return code level ?

Thanks for your help,

Jean-Marc

The java program:

class sqltp1ri
{
public static void main(String argv[])
{
Connection con = null;
int loop = 1;

try
{
// Get a connection
// Class.forName("com.ibm.db2.jcc.DB2Driver").newInst ance();
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").ne wInstance();

if (argv.length == 1) {
con = DriverManager.getConnection("jdbc:db2:tp1c1");
} else if (argv.length == 3) {
con = DriverManager.getConnection("jdbc:db2:tp1c1", argv[1],
argv[2]);
}
con.setAutoCommit(false);
int param = Integer.valueOf( argv[0] ).intValue();

System.out.println("Call stored procedure named SQLTP1DL for thread


"
+ argv[0]);

String sql = "CALL SQLTP1DL (?, ?, 10, ?)";
CallableStatement callStmt = con.prepareCall(sql);

while (loop <= 50) {

// set input parameters
callStmt.setInt(1, param);
callStmt.setInt(2, param);
callStmt.setInt(3, param);

// call the stored procedure

callStmt.execute();

// roll back any changes to the database
con.commit();
loop+=1;
}
callStmt.close();
con.close();
}
catch (Exception e)
{
try
{
con.rollback();
con.close();
}
catch (Exception x)
{ }

e.printStackTrace();
}
} // end main

}


Nov 12 '05 #3
Vaguely remember somathing about w_char compile option needed on some
procs...
I'd have to check more in the docs.

PM

"Jean-Marc Blaise" <no****@nowhere.com> a écrit dans le message de
news:br**********@news-reader5.wanadoo.fr...
Dear all,

I have simulated the windows MULTI application with a java program calling
the SQLTP1DL proc referenced as DB2DARI application, on Linux Intel or
ZLinux. If the proc is NOT FENCED, there is no pb and the program works
fine. If either the proc is FENCED, or FENCED THREADSAFE, I get a SQL1042C, or the instance crashes on ZLinux (V8.1 FP4).

The proc does a return(SQLZ_HOLD_PROC):
[db2inst1@gamma cf41]$ /opt/IBMJava2-131/bin/java sqltp1ri 1

Call stored procedure SQLTP1DL for thread 1

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/LINUX] SQL1042C An
unexpected system error occurred. SQLSTATE=58004

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGe nerator.java:273)

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGe nerator.java:215)

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_r eturn_code(SQLExceptionGen erator.java:440)

at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2 (DB2PreparedStatement.java :2199)

at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute( DB2PreparedStatement.java: 3969)

at sqltp1ri.main(sqltp1ri.java:39)

The proc does a return(SQLZ_DISCONNECT_PROC):

[db2inst1@gamma cf41]$

Call stored procedure SQLTP1DL for thread 1

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/LINUX] SQL1131N DARI
(Stored Procedure) process has been terminated abnormally. SQLSTATE=38503

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGe nerator.java:273)

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_S QLException(SQLExceptionGe nerator.java:215)

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_r eturn_code(SQLExceptionGen erator.java:440)

at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2 (DB2PreparedStatement.java :2199)

at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute( DB2PreparedStatement.java: 3969)

at sqltp1ri.main(sqltp1ri.java:39)

[db2inst1@gamma cf41]$
Do you have any idea if I could change a parameter to make it work - all the pb seems to be at the return code level ?

Thanks for your help,

Jean-Marc

The java program:

class sqltp1ri
{
public static void main(String argv[])
{
Connection con = null;
int loop = 1;

try
{
// Get a connection
// Class.forName("com.ibm.db2.jcc.DB2Driver").newInst ance();
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").ne wInstance();

if (argv.length == 1) {
con = DriverManager.getConnection("jdbc:db2:tp1c1");
} else if (argv.length == 3) {
con = DriverManager.getConnection("jdbc:db2:tp1c1", argv[1],
argv[2]);
}
con.setAutoCommit(false);
int param = Integer.valueOf( argv[0] ).intValue();

System.out.println("Call stored procedure named SQLTP1DL for thread " + argv[0]);

String sql = "CALL SQLTP1DL (?, ?, 10, ?)";
CallableStatement callStmt = con.prepareCall(sql);

while (loop <= 50) {

// set input parameters
callStmt.setInt(1, param);
callStmt.setInt(2, param);
callStmt.setInt(3, param);

// call the stored procedure

callStmt.execute();

// roll back any changes to the database
con.commit();
loop+=1;
}
callStmt.close();
con.close();
}
catch (Exception e)
{
try
{
con.rollback();
con.close();
}
catch (Exception x)
{ }

e.printStackTrace();
}
} // end main

}

Nov 12 '05 #4
or was it Prep... ?

PM
Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dave Sisk | last post by:
I've created a system or external trigger on an AS/400 file a.k.a DB2 table. (Note this is an external trigger defined with the ADDPFTRG CL command, not a SQL trigger defined with the CREATE...
3
by: Bruce Pullen | last post by:
db27.2 fp7 on AIX5.2 I just bounced the database (as a specific db2dari process had reached user memory limit), and some (orpahned) db2dari processes are still there. db2fenc1 42682 1...
2
by: Scav | last post by:
Helpful folks, Platform: DB2 UDB v7.2, Win2000, KEEPDARI=YES I am trying to reduce memory usage of our SP's. We only have 80 or so SP's but in the Task Manager/Processes display, there are...
12
by: Newbie | last post by:
how can i call an oracle function to get data without using a select statement or stored procedures? given a project_no, i need to call the function: ops$sqltime.pa_new_job_no_fn which will...
4
by: david | last post by:
Hello, From a web aspx page I need to call a two proc’s. The first proc returns the data quickly which I want populate a data grid. The second proc does some heavy processing so when it’s...
3
by: stephen | last post by:
when I try consuming this method the method just hangs, if I look at the processes I can see that the wscript is running but it just seems to hang. shouldn't this be fairly trivial calling an...
1
by: Radhakrishnans | last post by:
hai friends i am new to java and mysql.i have created stored procedures in mysql.Now i want to call that stored procedures in java.All works fine.but it show the following error. unreported...
3
by: mandible | last post by:
I'm trying to call one stored procedure inside another. I was wondering if this is possible Some ideas I was toying with is putting the first stored procedure inside of a temp table but haven't...
3
by: malkin | last post by:
Hello all, I have a web application which needs to call a console application and capture the output of that execution process. What I have is the following: ProcessStartInfo psi = new...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.