473,395 Members | 1,891 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,395 software developers and data experts.

DB2 SQL error: SQLCODE: -551, SQLSTATE: 42501

1
Hi All,

Since last couple of week i am trying to connect to QA box. But i am getting error. Strange thing is that i can connect to DEV box using same code. Please let me know what is the possible solution.

I am able to get connection. I am able to create statement but whenever program goign to line execute it throws error as below:

Here is my code:

Connection dbconn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
String sqlQuery = "select seqname from SYSIBM.SYSSEQUENCES";
Class.forName("com.ibm.db2.jcc.DB2Driver");
dbconn = DriverManager.getConnection"jdbc:db2://host:port/dbname", "user",
"passw");
System.out.println("Connection:"+dbconn);
pstmt = dbconn.prepareStatement(sqlQuery);
System.out.println("Created stmt:"+pstmt);
rs = pstmt.executeQuery();
System.out.println("got resultset:"+rs);

Error:

com.ibm.db2.jcc.b.SqlException: DB2 SQL error: SQLCODE: -551, SQLSTATE: 42501, SQLERRMC: ACPUSER;EXECUTE;NULLID.SYSSH200
at com.ibm.db2.jcc.b.zc.e(zc.java:1606)
at com.ibm.db2.jcc.b.zc.a(zc.java:1206)
at com.ibm.db2.jcc.a.db.h(db.java:149)
at com.ibm.db2.jcc.a.db.a(db.java:43)
at com.ibm.db2.jcc.a.r.a(r.java:30)
at com.ibm.db2.jcc.a.sb.g(sb.java:152)
at com.ibm.db2.jcc.b.zc.n(zc.java:1186)
at com.ibm.db2.jcc.b.ad.db(ad.java:1761)
at com.ibm.db2.jcc.b.ad.d(ad.java:2203)
at com.ibm.db2.jcc.b.ad.U(ad.java:489)
at com.ibm.db2.jcc.b.ad.executeQuery(ad.java:472)
Aug 2 '07 #1
0 17670

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Pedro Oguri | last post by:
On this piece of code: When SELECT returns nothing sqlca.sqlcode = 0 and no_data_found_func isn´t called. How do I know if the insertion was OK? EXEC SQL INSERT INTO TB_SWITCH ( ID_SWITCH,...
4
by: prasad | last post by:
I am getting sql error during binding a program which access a temporary table. The temporary table declaration and access methods are given below. EXEC SQL DECLARE GLOBAL TEMPORARY TABLE TEM88...
0
by: Dmitry Tolpeko | last post by:
Hello, Could anybody please explain me why DB2 z/OS 8.1 fails on the simple procedure below: Error: DSNHSMS2 LINE 12 COL 6 NESTED COMPOUND STATEMENTS NOT ALLOWED It failes on DECLARE...
15
by: Twan Kennis | last post by:
Hi, I have a DB2 database on the IBM iSeries platform, on which I created several Stored Procedures with the SQLCODE as a return-parameter. These Stored Procedures are called from a Windows...
1
by: chaitu | last post by:
Hi, Can anybody tell me what the error code for Export is. Like i get the message SQL3104N The Export utility is beginning to export data to file...
1
by: oddbande | last post by:
I get a lot of these messages in db2diag.log - seems like problems with health Monitor: 2007-01-05-15.05.06.380000+060 I260759H331 LEVEL: Severe PID : 3860 TID : 4004...
4
by: barmatt80 | last post by:
I am stumped on the error reporting with sql server. I was told i need to return @SQLCode(code showing if successful or not) and @ErrMsg(and the message returned). I am clueless on this. I...
1
by: barmatt80 | last post by:
I have found alot of help on this site, and is helping me along. I am having trouble with a stored procedure. This is my first stored procedure. The task I was given was to create a stored...
1
by: crazy_jutt | last post by:
Hi, We are getting following errors in diaglog. We have 4096 value as MAXAGENTS and 512 for maxuproc I am confused as which value we are hitting. are we hitting OS ( maxuproc ) value or...
3
by: barmatt80 | last post by:
I have read many error message articles on the web but still cannot get this to work. I need to return the description of the error that is produced to a output variable (@ErrMsg). In my stored...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.