Skip to Main Content

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Velayutham.

Asked: May 23, 2000 - 5:30 am UTC

Last updated: June 11, 2004 - 1:30 pm UTC

Version: Ora 8i Rel 8.1.5

Viewed 1000+ times

You Asked

Dear Tom,

Getting the Error:[Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation

I am having a table which is having a 60,000 records. If I try to retrieve 10 records
from the table I am getting the followig error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e31'

[Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation

bug.asp, line 20 (i.e in the rs.open statement)

I am getting the above error exactly after 30 seconds.

I have checked with the Oracle documentation the error says that the user has pressed the
CTRL+C

I have not done anything. I think so the IIS has fired the key.

I am using the following configuration:

WinNT 4.0,IIS 4.0, Oracle 8i(8.1.5), Windows 98 Nodes,IE5.0 is the browser.
Session Timeout 20 minutes
ASP Script timeout 90 seconds
I am using Oracle ODBC Driver for dsn connection.


The following is the source code.

<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<!--#include file="adovbs.inc"-->
<%
Dim rs,sql,dsn
set rs = server.createObject("ADODB.Recordset")
sql = " SELECT Col1 FROM CLIENT "
dsn = "dsn=oracleserver;uid=dp2000;pwd=dp2000;"
rs.activeconnection = dsn
rs.cursorlocation = 3
rs.cursortype = adopenstatic
rs.source = sql
rs.open
rs.activeconnection = nothing
rs.pagesize = 10
rs.MoveFirst
Response.Write("<br>")
Response.Write("Client Name")
Response.Write("<br>")
For i = 1 to 10
Response.Write(rs.Fields("col1"))
Response.Write("<br>")
rs.MoveNext
Next
%>
</BODY>
</HTML>

Thanking You.

Regards

S. Velayutham


and Tom said...

I believe you'll be able to fix this by reconfiguring your DSN...

Problem Description
-------------------

You recently upgraded to oracle 8.x ODBC driver, and now occasionally receive the following error during execution of a query:

ORA-1013 user requested cancel of current operation

This occurs particularly with long running queries.

The same query ran fine with the Oracle 7 ODBC driver.


Explanation
-----------

The Oracle 8 driver implemented a timeout feature, which did not exist with the 7 driver. The base version of the driver does not provide facilities to disable the timeout. Later versions of the odbc driver provide a feature to disable query timeout.


Solution Description
--------------------

Upgrade to the latest version of the driver if you are using 8.0.5.2 or less, reconfigure the DSN, and uncheck the checkbox that says 'Enable Query Timeout'.

To reconfigure the DSN, open the odbc administrator, select the DSN you are using, and click the 'configure' button.

Any version after 8.0.5.3.0 (for an 805 client) or 8.1.5.1.0 (for 8.1.5) will have the option.

The latest version is available at:

</code> ftp://oracle-ftp.oracle.com/dev_tools/patchsets/mslang/odbc/ <code>


Rating

  (6 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

odbc ORA-01013

John S. Hambleton jhamblet@nmu.edu, May 30, 2001 - 2:31 pm UTC

So glad I found this.
We are having the exact same problem.



odbc ORA-01013

Jean Paul Braun, January 31, 2002 - 4:00 pm UTC

It was the solution for me. I changed The Timeout Attribute directly in my DNS file, from QTO=T, to QTO=F (i think that means "Query Time Out", and i changed from "True" to "False", cause it worked!


ODBC ORA-01013

Tim Lindgren, February 27, 2002 - 1:10 pm UTC

Installing the 8.0.5 patch fixed my problem as well.

Thanks!

Query Timeout

Jack, December 11, 2003 - 1:51 pm UTC

Is there something that can be done to cancel a query after it has been running for a specific amount of time and has not come back with data?



Tom Kyte
December 11, 2003 - 2:11 pm UTC

look at the resource profiles -- you can limit many many many things. see the admin guide.

ODBC ORA-01013

Dave Crane, June 11, 2004 - 1:30 pm UTC

Thank you for the information. I was experiencing the same behavior with Oracle 9i. The ODBC administrator now gives you a check box to disable this when you reconfigure the DSN.

Error by TimeOut

A reader, October 30, 2006 - 5:57 pm UTC

Excellent, because the solution was QTO=False is complete and sucessful!!!!