Hello, i am new to Java and DB2. If my posting is just too stupid, please dont laugh that loud.
Situation:
There is my PC with a JAVA-application
There is another PC running a DB2.
Both PCs stand in different buildings, connected via VPN.
An IBM DB2 client runs on my PC.
The JAVA-application ist connected to the DB2, i can send SQL-queries and receive results.
Everything fine until now...
The Problem is:
I want to send other commands to the DB2 like "get snapshot for all on ds2"
But that doesnt work!
Here is my code:
Code:
Connection con = null;
try
{
con = DriverManager.getConnection( "jdbc:db2:DS2", "**username**", "**password**" );
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery( "get snapshot for all on ds2" );
I get this error: "com.ibm.db2.jcc.b.SqlException: [jcc][10103][10941][3.50.152] Die Methode executeQuery kann nicht zur Aktualisierung verwendet werden. ERRORCODE=-4476, SQLSTATE=null
"
This is german. It means "you cant update with executeQuery"...
BUT: I dont update my Database. I just want to read some Monitor-datas...
Help! How to read monitor-data from DS2?