Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Problem executing stored procedure from JDBC

Author  Topic 

cornelius
Starting Member

11 Posts

Posted - 2009-06-22 : 10:23:50
Hello

I have a strange problem I've been breaking my head over for days now...

We have a stored procedure in SQL Server which, mainly, runs a sliding window operation on several tables (several partition functions) in our system. When the procedure is executed from sql server (by management studio, "execute stored procedure" or as a job running the procedure- "start job", and also when we created a scheduled job) it finishes in a reasonable time and without a problem. We tried moving our jobs to run from our Java program. We use a JDBC driver and just execute the command: "exec xxxx" (when xxxx is the name of the procedure). The procedure just won't finish! a 20 seconds operation is stuck for hours. When looking at the activity monitor I can see that the process is in suspend mode, and the wait type is "async_network_io". Also, I can see that the value of "network utilization" for the network in the server running the Java program gets up to 85%!

Any thought why this is happenning and what can we do?

Thank you
Nili

cornelius
Starting Member

11 Posts

Posted - 2009-06-22 : 10:58:21
I should state that other than sliding window (split, merge, drop partitions and tables, and deletion of data) the procedure doesn't return any results, so if there is a way to state for the JDBC driver when executing the procedure, that all procedures should be ran on the server without any data exchange with the client- this may solve my problem, right? Any ideas?
Go to Top of Page
   

- Advertisement -