Thread: [Squirrel-sql-users] SQUIRREL_GET_ERROR_OFFSET?
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
From: Thomas H. <tho...@gm...> - 2007-12-03 20:28:35
|
Hi, I'm on the latest 2.6.1. When I upgraded to this at end of Oct. My DBA told me that he started seeing objects in the DB "SQUIRREL_GET_ERROR_OFFSET". What is this and is there a way to disable this so my Squirrel client won't create this? I've been using Squirrel for years and have never been told by the DBA about these objects, so I'm just thinking if this is v2.6.1. related. TIA, Thomas |
From: Robert M. <rob...@gm...> - 2007-12-04 00:29:05
|
On Dec 3, 2007 3:28 PM, Thomas Han <tho...@gm...> wrote: > Hi, > > I'm on the latest 2.6.1. When I upgraded to this at end of Oct. My DBA > told me that he started seeing objects in the DB > "SQUIRREL_GET_ERROR_OFFSET". > > What is this and is there a way to disable this so my Squirrel client won't > create this? I've been using Squirrel for years and have never been told by > the DBA about these objects, so I'm just thinking if this is v2.6.1. > related. It is a function that the Oracle plugin creates and uses to position the cursor at the statement token where a syntax error occurred. It has the following definition and is created when an Oracle session is connected while the Oracle plugin is loaded. create or replace function (query IN varchar2) return number authid current_user is l_theCursor integer default dbms_sql.open_cursor; l_status integer; begin begin dbms_sql.parse( l_theCursor, query, dbms_sql.native ); exception when others then l_status := dbms_sql.last_error_position; end; dbms_sql.close_cursor( l_theCursor ); return l_status; end; Oracle doesn't provide this information via the JDBC driver so it's not possible to do this without using a function (at least, I couldn't think of a way). Unfortunately for you, there is no other way to disable it's creation other than to disable the Oracle plugin. It hadn't occurred to me that user functions were off-limits in some cases. I'll make a note to make this configurable in 2.6.3 and 2.7. Rob |
From: Thomas H. <tho...@gm...> - 2007-12-04 00:58:19
|
Rob, Thanks so much for the explanation. I think I'll just turn off the Oracle plugin in the mean time or downgrade back to 2.6 until 2.7. Thanks again. Cheers, Thomas On Dec 3, 2007 4:29 PM, Robert Manning <rob...@gm...> wrote: > On Dec 3, 2007 3:28 PM, Thomas Han <tho...@gm...> wrote: > > Hi, > > > > I'm on the latest 2.6.1. When I upgraded to this at end of Oct. My DBA > > told me that he started seeing objects in the DB > > "SQUIRREL_GET_ERROR_OFFSET". > > > > What is this and is there a way to disable this so my Squirrel client > won't > > create this? I've been using Squirrel for years and have never been > told by > > the DBA about these objects, so I'm just thinking if this is v2.6.1. > > related. > > It is a function that the Oracle plugin creates and uses to position > the cursor at the statement token where a syntax error occurred. It > has the following definition and is created when an Oracle session is > connected while the Oracle plugin is loaded. > > create or replace function > (query IN varchar2) > return number authid current_user > is > l_theCursor integer default dbms_sql.open_cursor; > l_status integer; > begin > begin > dbms_sql.parse( l_theCursor, query, dbms_sql.native ); > exception > when others then l_status := dbms_sql.last_error_position; > end; > dbms_sql.close_cursor( l_theCursor ); > return l_status; > end; > > Oracle doesn't provide this information via the JDBC driver so it's > not possible to do this without using a function (at least, I couldn't > think of a way). Unfortunately for you, there is no other way to > disable it's creation other than to disable the Oracle plugin. It > hadn't occurred to me that user functions were off-limits in some > cases. I'll make a note to make this configurable in 2.6.3 and 2.7. > > Rob > |
From: Robert M. <rob...@gm...> - 2007-12-04 11:02:55
|
On Dec 3, 2007 7:58 PM, Thomas Han <tho...@gm...> wrote: > Rob, > > Thanks so much for the explanation. I think I'll just turn off the Oracle > plugin in the mean time or downgrade back to 2.6 until 2.7. You won't have to wait until 2.7 - 2.6.3 will have it. Also, you can disable the Oracle plugin using the Plugins -> Summary dialog. Just uncheck "Load at startup" checkbox next to Oracle. Then restart. Rob |
From: Robert M. <rob...@gm...> - 2007-12-06 02:16:56
|
The change is on the trunk (2.7) and on the 2.6 branch (2.6.3). It will also go out in the next snapshot if you want a preview. Look in Oracle plugin configuration tab (Global Preferences -> Oracle) for "Show Syntax Error Offset in SQL Editor", which you can uncheck if you don't want the user-defined function to be created (it also disables placing the caret at the position of the syntax error) Rob On Dec 4, 2007 6:02 AM, Robert Manning <rob...@gm...> wrote: > On Dec 3, 2007 7:58 PM, Thomas Han <tho...@gm...> wrote: > > Rob, > > > > Thanks so much for the explanation. I think I'll just turn off the Oracle > > plugin in the mean time or downgrade back to 2.6 until 2.7. > > You won't have to wait until 2.7 - 2.6.3 will have it. Also, you can > disable the Oracle plugin using the Plugins -> Summary dialog. Just > uncheck "Load at startup" checkbox next to Oracle. Then restart. > > Rob > |