Hello:
I have a java application to query db2 blu but I get the following error:
com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-955, SQLSTATE=57011, SQLERRMC=3
The java connection and code is:
String url;
Connection con = null;
Statement stmt;
ResultSet rs = null;
url = "jdbc:db2://localhost:50001/testdb:user=userdb2;password=4&DDSG%;specialRegisters=CURRENT QUERY ACCELERATION=ELIGIBLE;";
try {
Class.forName("com.ibm.db2.jcc.DB2Driver");
con = DriverManager.getConnection(url);
stmt = con.createStatement();
rs = stmt.executeQuery("SELECT * FROM tablename");
}
Connection to db2 is OK but the error occure in this line:
rs = stmt.executeQuery("SELECT * FROM tablename");
Could you help me please?
Regards.
Tags:
Hi Emmanuel,
try this:
String query = "SELECT COUNT(*) FROM SYSCAT.TABLES";
rs = stmt.executeQuery(query);
Best regards
Joachim
Thanks Joachim:
Execution is OK but fails if I do it for my database with column organized tables.
Hi Emmanuel,
you have not enough memory. Please look at db2 '? SQL0955' for further Information.
Best regards
Joachim
I've changed SHEAPTHRES_SHR but the error occure when i execute query from java or data studio. If I execute query from command line in the datbase server, it is ok.
Regards.
Please run "db2 autoconfigure apply none" for a suggestion what DB2 tries to set.
Best regards
Joachim
© 2019 Created by channeldb2.
Powered by