Cursor_sharing, mdsaora, ora-00937

On top of the Oracle database, most of my application experience has revolved around either Vignette or Java.

Therefore, when we had a problem the other day (in a test system, of course…) it was good to gain a little insight into some different drivers.

What did we do before Google? I can hardly remember.

Anyway, in order to try to boost the performance of part of the database, I thought I would sneak in an after logon trigger for a particular application that does not use bind variables. The trigger would fire for a particular connecting user and do an “ALTER SESSION” to set the “CURSOR_SHARING” parameter to “FORCE”.

Most of the application was fine. However, a small legacy bit of code was raising an Oracle error from within the VB layer:

“ORA-00937: not a single-group group function.”

From metalink (although it wasn’t an immediately obvious search to find it there) and from a single entry on google groups, it turns out that there is an issue with the microsoft mdsadora driver. The metalink article talked also talked about OCI 7 and OCI 8.

Apparently and allegedly, if the cursor_sharing parameter is set to anything other than “EXACT”, then the driver appends a column into the select clause such that something like “SELECT count(*) FROM table” becomes “SELECT count(*), ROWID from table” … and the inevitable error arises. So, no CURSOR_SHARING setting then. Damn….

About these ads

One Response to Cursor_sharing, mdsaora, ora-00937

  1. Pingback: Cursor_sharing, mdsadora, ora-00937 part II « OraStory

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 62 other followers

%d bloggers like this: