My Oracle Support Banner

Select Statement Gives Error "Connection is Busy With Results For Another Hstmt" Using Dg4odbc and SQL*Server 2000 When Configured For MARS (Doc ID 763882.1)

Last updated on FEBRUARY 15, 2023

Applies to:

Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Linux x86-64

Symptoms

-- Problem Statement:
The following select statement -

SELECT b.recname,count(b.recname)
FROM pspnlgroup@DEV83S a, pspnlfield@DEV83S b
WHERE (a.pnlname = b.pnlname OR a.pnlname = b.subpnlname)
AND a.pnlgrpname = 'USERMAINT'
AND b.RECNAME not like '%VW'
AND b.RECNAME not like 'WRK%'
AND b.RECNAME not like 'DERIVED%'
GROUP BY b.recname;

 

gives the error -

hgopoer, line 159: got native error 0 and sqlstate HY000; message follows...
[DataDirect][ODBC SQL Server Driver]Connection is busy with results for
another hstmt

 

TheSQL works without an error if the statement includes just 2 'like' statements in the 'where' clause.
The error only happens after a third 'like' statement is added.
For example the following statement works fine -

SELECT b.recname,count(b.recname)
FROM pspnlgroup@DEV83S a, pspnlfield@DEV83S b
WHERE (a.pnlname = b.pnlname OR a.pnlname = b.subpnlname)
AND a.pnlgrpname = 'USERMAINT'
AND b.RECNAME not like '%VW'
AND b.RECNAME not like 'WRK%'
--AND b.RECNAME not like 'DERIVED%'
GROUP BY b.recname;

 

The problem seems to occur only in Linux using DG4ODBC and a combination of table joins 
and 'group by' in the select statements.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.