Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Could not find prepared statement with handle xx


Could not find prepared statement with handle xx

Author
Message
ings
ings
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 11
Hi

I am having a randomly recurring problem where I get the error message:

"Could not find prepared statement with handle xx"

where xx is a number.

The problem occurs randomly and can be solved just by forcing a dummy change in my SQL (such as a new line break) and re-running it, with no SQL changes.

Does anyone have any ideas on what could cause this?

Thanks!
SQL ORACLE
SQL ORACLE
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1493 Visits: 1314
Is it the full error message?
Do you use JAVA?
Does your server have a limit in concurrent users?
The following link may help a little bit.
http://developer.atlassian.com/jira/browse/SQL-30
ings
ings
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 11
It a Java app, although that is hidden from my interface, where I am writing just the SQL and submitting it. The full message I get is:

sql: java.sql.SQLException: Could not find prepared statement with handle 1.

...but I don't get the java stack dump (maybe its hidden from my application).

Not sure about the concurrent server user limit - it should be high.

What is actually happening on SQL Server when I use (or at least the Java ODBC driver uses) prepared statements?
I would guess that on first execution, the statement is prepared and executed. On subsequent executions, a handle is used to point to the prepared statement, and therefore only the execution actually takes place (instead of prepare & execute). Could anybody confirm that is how it should work?

Thanks!
SQL ORACLE
SQL ORACLE
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1493 Visits: 1314
You can cooperate with your DBA to check the version of your SQL Server, and its setting of max connections.
ings
ings
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 11
We have SQL Server 2000 and maxActive is set to 20 for our connection.
cthompson 81525
cthompson 81525
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 13
Check out microsoft ADO.NET 2.0 hotfix in this link, it appears to be related to your problem:
http://support.microsoft.com/kb/913765
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search