Skip to Content.
Sympa Menu

freetds - Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Pickett, David" <David.Pickett AT phlx.com>
  • To: 'FreeTDS Development Group' <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC
  • Date: Tue, 1 Nov 2005 12:22:15 -0500

Vitaly,

I did test OK with tsql and unixODBC isql (I linked mine to the name isqlo
to sidestep the Interbase one). I tried the SQuirreL SQL window again, and
now I am getting sp_help, sp_tables OK, but still no Objects Tree. For your
command suggestions, I get:
-------------------------------------------------------------------
tdas-srv2:9:pts/127 /export/home/uabdp3
$ tsql -C

Compile-time settings (established with the "configure" script):
Version: freetds v0.63
MS db-lib source compatibility: no
Sybase binary compatibility: unknown
Thread safety: yes
iconv library: yes
TDS version: 5.0
iODBC: no
unixodbc: yes
tdas-srv2:9:pts/127 /export/home/uabdp3
$ isqlo --version
unixODBC 2.2.7
tdas-srv2:9:pts/127 /export/home/uabdp3
$
----------------------------------------------------------------------------
--

(Nice to have thread safety, I guess due to some fluke of build environment
states, but in ODBC, can you trust all callers to be MTSafe?)

Maybe I need to configure TDS Version to 8.0 somewhere. I was a bit
surprised that the TDS Version is not something discovered or negotiated,
but I guess we are where we are! I guess I can make it over or set an ENV
var. I wanted to cycle SQuirreL anyway, to save the configuration before it
crashed:

----------------------------------------------------------------
Environment Variables
.
.
.

TDSVER
governs the version of the TDS protocol used to connect to your server. For
a given server, FreeTDS inspects four sources in the following order to
determine which TDS protocol version to use, using the first one it finds.

1. The value specified in TDSVER

2. A freetds.conf file entry (see below)

3. The interfaces file entry (see below)

4. The --with-tdsver option passed to configure
--------------------------------------------------------------------------

This seems to contradict the following doc fragment, where it seems to also
be an ODBC parameter in ~/.odbc.ini, but now I wonder, in ODBC, is the
environment variable TDSVER in play? These doc entries need adjustment to
agree:
-------------------------------------------------------------------------
Table 4-1. Connection attributes

Name Meaning
Possible Values Default
In odbc.ini
.
.
.
TDS_Version TDS protocol version to use (e.g., 5.0, 7.0). Any valid
protocol version Depends on the TDS version specified with
configure yes
----------------------------------------------------------------------

I see TDS_Version was already set to 8.0 in .odbc.ini:
----------------------------------------------
[Macola1Free]
Driver = FreeTDS
Description = FreeTDS driver
Server = phlxsql03.phlx.net
Port = 1433
Database = master
User =
Password =
Trace = No
TDS_Version = 8.0
---------------------------------
I tried SQuirreL with TDSVER=8.0 in the environment as well, and it does not
help the Objects Tree. Maybe I have a less viable version of SQuirreL (2.0
rc1)!

When it fails, the log window says:
--------------------
Error: Macola1_Free_ODBC: java.sql.SQLException: [unixODBC][FreeTDS][SQL
Server]The database name component of the object qualifier must be the name
of the current database.
--------------------
and the catalog widget, where a SQL Server DB name should be visible, is
blank, so I think the problem is something to do with identifying the right
"database.owner.object" during metadata extraction.

The jdbcdebug.log says:
----------------------------------
*Driver.connect (jdbc:odbc:Macola1Free)
JDBC to ODBC Bridge: Checking security
No SecurityManager present, assuming trusted application/applet
JDBC to ODBC Bridge 2.0001
Current Date/Time: Tue Nov 01 10:36:18 GMT-05:00 2005
Loading JdbcOdbc library
Allocating Environment handle (SQLAllocEnv)
hEnv=3059112
Allocating Connection handle (SQLAllocConnect)
...skipping forward
java.sql.SQLException: [unixODBC][FreeTDS][SQL Server]Invalid cursor state
Get string data (SQLGetData), hStmt=3898184, column=1, maxLen=129
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
at sun.jdbc.odbc.JdbcOdbc.SQLTables(JdbcOdbc.java:5519)
at
sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getTables(JdbcOdbcDatabaseMetaData.ja
va:2395)
at
sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getTableTypes(JdbcOdbcDatabaseMetaDat
a.java:2505)
at
net.sourceforge.squirrel_sql.fw.sql.SQLDatabaseMetaData.getTableTypes(SQLDat
abaseMetaData.java:768)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.expanders.D
atabaseExpander.<init>(DatabaseExpander.java:69)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeM
odel.<init>(ObjectTreeModel.java:81)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTree.
<init>(ObjectTree.java:119)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeP
anel.CreateGUI(ObjectTreePanel.java:752)
int
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeP
anel.<init>(ObjectTreePanel.java:149)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.ObjectTreeTab.getCompo
nent(ObjectTreeTab.java:84)
...skipping backward
numeric() identity
Fetching (SQLFetch), hStmt=3898184
Get string data (SQLGetData), hStmt=3898184, column=1, maxLen=129
decimal
Fetching (SQLFetch), hStmt=3898184
Get string data (SQLGetData), hStmt=3898184, column=1, maxLen=129
money
*Connection.getMetaData
Fetching (SQLFetch), hStmt=3898184
*DatabaseMetaData.getTableTypes
*DatabaseMetaData.getTables (null,null,%,null)
Allocating Statement Handle (SQLAllocStmt), hDbc=5012296
hStmt=3912120
Tables (SQLTables), hStmt=3912120,catalog=null, schema=null, table=%,
types=nullGet string data (SQLGetData), hStmt=3898184, column=1, maxLen=129
smallmoney
Fetching (SQLFetch), hStmt=3898184
RETCODE = -1
ERROR - Generating SQLException...
Get string data (SQLGetData), hStmt=3898184, column=1, maxLen=129
decimal() identity
Fetching (SQLFetch), hStmt=3898184
SQLException: SQLState(24000) vendor code(0)
java.sql.SQLException: [unixODBC][FreeTDS][SQL Server]Invalid cursor state
Get string data (SQLGetData), hStmt=3898184, column=1, maxLen=129
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
at sun.jdbc.odbc.JdbcOdbc.SQLTables(JdbcOdbc.java:5519)
at
sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getTables(JdbcOdbcDatabaseMetaData.ja
va:2395)
at
sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getTableTypes(JdbcOdbcDatabaseMetaDat
a.java:2505)
at
net.sourceforge.squirrel_sql.fw.sql.SQLDatabaseMetaData.getTableTypes(SQLDat
abaseMetaData.java:768)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.expanders.D
atabaseExpander.<init>(DatabaseExpander.java:69)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeM
odel.<init>(ObjectTreeModel.java:81)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTree.
<init>(ObjectTree.java:119)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeP
anel.CreateGUI(ObjectTreePanel.java:752)
int
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeP
anel.<init>(ObjectTreePanel.java:149)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.ObjectTreeTab.getCompo
nent(ObjectTreeTab.java:84)
Fetching (SQLFetch), hStmt=3898184
at
net.sourceforge.squirrel_sql.client.gui.session.MainPanel.addMainPanelTab(Ma
inPanel.java:194)
at
net.sourceforge.squirrel_sql.client.gui.session.MainPanel.<init>(MainPanel.j
ava:109)
at
net.sourceforge.squirrel_sql.client.gui.session.SessionPanel.createGUI(Sessi
onPanel.java:423)
at
net.sourceforge.squirrel_sql.client.gui.session.SessionPanel.<init>(SessionP
anel.java:101)
at
net.sourceforge.squirrel_sql.client.gui.session.SessionInternalFrame.createG
UI(SessionInternalFrame.java:155)
at
net.sourceforge.squirrel_sql.client.gui.session.SessionInternalFrame.<init>(
SessionInternalFrame.java:51)
at
net.sourceforge.squirrel_sql.client.gui.WindowManager.createInternalFrame(Wi
ndowManager.java:375)
at
net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$R
unner.run(ConnectToAliasCommand.java:446)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
va:234)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
:163)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Get string data (SQLGetData), hStmt=3898184, column=1, maxLen=129
int identity
Free statement (SQLFreeStmt), hStmt=3912120, fOption=1
Fetching (SQLFetch), hStmt=3898184
Get string data (SQLGetData), hStmt=3898184, column=1, maxLen=129
smallint
Fetching (SQLFetch), hStmt=3898184
Get string data (SQLGetData), hStmt=3898184, column=1, maxLen=129
smallint identity
Fetching (SQLFetch), hStmt=3898184
Get string data (SQLGetData), hStmt=3898184, column=1, maxLen=129
float
Fetching (SQLFetch), hStmt=3898184
Get string data (SQLGetData), hStmt=3898184, column=1, maxLen=129
real
Fetching (SQLFetch), hStmt=3898184
Get string data (SQLGetData), hStmt=3898184, column=1, maxLen=129
datetime
Fetching (SQLFetch), hStmt=3898184
*Connection.getMetaData
*DatabaseMetaData.supportsCatalogsInTableDefinitions
Get connection info (SQLGetInfo), hDbc=5012296, fInfoType=92
Get string data (SQLGetData), hStmt=3898184, column=1, maxLen=129
int value=7
smalldatetime
Fetching (SQLFetch), hStmt=3898184
Get string data (SQLGetData), hStmt=3898184, column=1, maxLen=129
varchar
Fetching (SQLFetch), hStmt=3898184
End of result set (SQL_NO_DATA)
*ResultSet.close
Free statement (SQLFreeStmt), hStmt=3898184, fOption=1
*ResultSet has been closed
*DatabaseMetaData.getNumericFunctions
Get connection info (SQLGetInfo), hDbc=5012296, fInfoType=49
int value=8388607
*DatabaseMetaData.getStringFunctions
Get connection info (SQLGetInfo), hDbc=5012296, fInfoType=50
int value=5242591
*DatabaseMetaData.getTimeDateFunctions
Get connection info (SQLGetInfo), hDbc=5012296, fInfoType=52
int value=2097151
*DatabaseMetaData.getCatalogs
*DatabaseMetaData.getTables (%,,,null)
Allocating Statement Handle (SQLAllocStmt), hDbc=5012296
hStmt=3912120
Tables (SQLTables), hStmt=3912120,catalog=%, schema=, table=, types=null
RETCODE = -1
ERROR - Generating SQLException...
SQLException: SQLState() vendor code(15250)
java.sql.SQLException: [unixODBC][FreeTDS][SQL Server]The database name
component of the object qualifier must be the name of the current database.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
at sun.jdbc.odbc.JdbcOdbc.SQLTables(JdbcOdbc.java:5519)
at
sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getTables(JdbcOdbcDatabaseMetaData.ja
va:2395)
at
sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getCatalogs(JdbcOdbcDatabaseMetaData.
java:2471)
at
net.sourceforge.squirrel_sql.client.session.SchemaInfo.loadCatalogs(SchemaIn
fo.java:191)
at
net.sourceforge.squirrel_sql.client.session.SchemaInfo.load(SchemaInfo.java:
125)
at
net.sourceforge.squirrel_sql.client.session.Session.loadTableInfo(Session.ja
va:632)
at
net.sourceforge.squirrel_sql.client.session.Session.access$100(Session.java:
65)
at
net.sourceforge.squirrel_sql.client.session.Session$1.run(Session.java:190)
at
net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82)
at java.lang.Thread.run(Thread.java:595)
Free statement (SQLFreeStmt), hStmt=3912120, fOption=1
*DatabaseMetaData.getSchemas
*DatabaseMetaData.getTables (,%,,null)
Allocating Statement Handle (SQLAllocStmt), hDbc=5012296
hStmt=3912120
Tables (SQLTables), hStmt=3912120,catalog=, schema=%, table=, types=null
Number of result columns (SQLNumResultCols), hStmt=3912120
value=5
Fetching (SQLFetch), hStmt=3912120
*ResultSet.getMetaData
*ResultSetMetaData.getColumnName (1)
Column attributes (SQLColAttributes), hStmt=3912120, icol=2, type=1
value (String)=TABLE_OWNER
java.sql.SQLException: Column not found
at
sun.jdbc.odbc.JdbcOdbcResultSet.findColumn(JdbcOdbcResultSet.java:1849)
at
sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:410)
at
net.sourceforge.squirrel_sql.client.session.SchemaInfo.loadSchemas(SchemaInf
o.java:219)
at
net.sourceforge.squirrel_sql.client.session.SchemaInfo.load(SchemaInfo.java:
136)
at
net.sourceforge.squirrel_sql.client.session.Session.loadTableInfo(Session.ja
va:632)
at
net.sourceforge.squirrel_sql.client.session.Session.access$100(Session.java:
65)
at
net.sourceforge.squirrel_sql.client.session.Session$1.run(Session.java:190)
at
net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82)
at java.lang.Thread.run(Thread.java:595)
SQLException: SQLState(S0022)
*ResultSet.close
Free statement (SQLFreeStmt), hStmt=3912120, fOption=1
*ResultSet has been closed
-----------------------------------------

and the squirrel-sql.log is similarly chatty:
---------------------------------------------
35439 [Thread-4] DEBUG
net.sourceforge.squirrel_sql.client.session.SchemaInfo - Keywords loaded
36913 [AWT-EventQueue-0] DEBUG
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.expanders.D
atabaseExpander - DBMS doesn't support 'getTableTypes()
java.sql.SQLException: [unixODBC][FreeTDS][SQL Server]Invalid cursor state
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
at sun.jdbc.odbc.JdbcOdbc.SQLTables(JdbcOdbc.java:5519)
at
sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getTables(JdbcOdbcDatabaseMetaData.ja
va:2395)
at
sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getTableTypes(JdbcOdbcDatabaseMetaDat
a.java:2505)
at
net.sourceforge.squirrel_sql.fw.sql.SQLDatabaseMetaData.getTableTypes(SQLDat
abaseMetaData.java:768)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.expanders.D
atabaseExpander.<init>(DatabaseExpander.java:69)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeM
odel.<init>(ObjectTreeModel.java:81)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTree.
<init>(ObjectTree.java:119)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeP
anel.CreateGUI(ObjectTreePanel.java:752)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeP
anel.<init>(ObjectTreePanel.java:149)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.ObjectTreeTab.getCompo
nent(ObjectTreeTab.java:84)
at
net.sourceforge.squirrel_sql.client.gui.session.MainPanel.addMainPanelTab(Ma
inPanel.java:194)
at
net.sourceforge.squirrel_sql.client.gui.session.MainPanel.<init>(MainPanel.j
ava:109)
at
net.sourceforge.squirrel_sql.client.gui.session.SessionPanel.createGUI(Sessi
onPanel.java:423)
at
net.sourceforge.squirrel_sql.client.gui.session.SessionPanel.<init>(SessionP
anel.java:101)
at
net.sourceforge.squirrel_sql.client.gui.session.SessionInternalFrame.createG
UI(SessionInternalFrame.java:155)
at
net.sourceforge.squirrel_sql.client.gui.session.SessionInternalFrame.<init>(
SessionInternalFrame.java:51)
at
net.sourceforge.squirrel_sql.client.gui.WindowManager.createInternalFrame(Wi
ndowManager.java:375)
at
net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$R
unner.run(ConnectToAliasCommand.java:446)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
va:234)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
:163)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
37339 [Thread-4] DEBUG
net.sourceforge.squirrel_sql.client.session.SchemaInfo - Loading functions
37405 [Thread-4] DEBUG
net.sourceforge.squirrel_sql.client.session.SchemaInfo - Functions loaded
37406 [Thread-4] DEBUG
net.sourceforge.squirrel_sql.client.session.SchemaInfo - Loading functions
37494 [Thread-4] ERROR
net.sourceforge.squirrel_sql.client.session.SchemaInfo - failed to load
catalog names
java.sql.SQLException: [unixODBC][FreeTDS][SQL Server]The database name
component of the object qualifier must be the name of the current database.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
at sun.jdbc.odbc.JdbcOdbc.SQLTables(JdbcOdbc.java:5519)
at
sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getTables(JdbcOdbcDatabaseMetaData.ja
va:2395)
at
sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getCatalogs(JdbcOdbcDatabaseMetaData.
java:2471)
at
net.sourceforge.squirrel_sql.client.session.SchemaInfo.loadCatalogs(SchemaIn
fo.java:191)
at
net.sourceforge.squirrel_sql.client.session.SchemaInfo.load(SchemaInfo.java:
125)
at
net.sourceforge.squirrel_sql.client.session.Session.loadTableInfo(Session.ja
va:632)
at
net.sourceforge.squirrel_sql.client.session.Session.access$100(Session.java:
65)
at
net.sourceforge.squirrel_sql.client.session.Session$1.run(Session.java:190)
at
net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82)
at java.lang.Thread.run(Thread.java:595)
37497 [Thread-4] DEBUG
net.sourceforge.squirrel_sql.client.session.SchemaInfo - Functions loaded
37508 [Thread-4] DEBUG
net.sourceforge.squirrel_sql.client.session.SchemaInfo - Loading functions
37622 [Thread-4] ERROR
net.sourceforge.squirrel_sql.client.session.SchemaInfo - failed to load
schema names
java.sql.SQLException: Column not found
at
sun.jdbc.odbc.JdbcOdbcResultSet.findColumn(JdbcOdbcResultSet.java:1849)
at
sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:410)at
net.sourceforge.squirrel_sql.client.session.SchemaInfo.loadSchemas(SchemaInf
o.java:219)
at
net.sourceforge.squirrel_sql.client.session.SchemaInfo.load(SchemaInfo.java:
136)
at
net.sourceforge.squirrel_sql.client.session.Session.loadTableInfo(Session.ja
va:632)
at
net.sourceforge.squirrel_sql.client.session.Session.access$100(Session.java:
65)
at
net.sourceforge.squirrel_sql.client.session.Session$1.run(Session.java:190)
at
net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82)
at java.lang.Thread.run(Thread.java:595)
37627 [Thread-4] DEBUG
net.sourceforge.squirrel_sql.client.session.SchemaInfo - Functions loaded
37628 [Thread-4] DEBUG
net.sourceforge.squirrel_sql.client.session.SchemaInfo - Loading tables
38140 [Thread-4] ERROR
net.sourceforge.squirrel_sql.client.session.SchemaInfo - failed to load
table names
java.sql.SQLException: Column not found
at
sun.jdbc.odbc.JdbcOdbcResultSet.findColumn(JdbcOdbcResultSet.java:1849)
at
sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:410)at
net.sourceforge.squirrel_sql.client.session.SchemaInfo.loadTables(SchemaInfo
.java:761)
at
net.sourceforge.squirrel_sql.client.session.SchemaInfo.load(SchemaInfo.java:
148)
at
net.sourceforge.squirrel_sql.client.session.Session.loadTableInfo(Session.ja
va:632)
at
net.sourceforge.squirrel_sql.client.session.Session.access$100(Session.java:
65)
at
net.sourceforge.squirrel_sql.client.session.Session$1.run(Session.java:190)
at
net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82)
at java.lang.Thread.run(Thread.java:595)
38144 [Thread-4] DEBUG
net.sourceforge.squirrel_sql.client.session.SchemaInfo - Tables loaded
38146 [Thread-4] DEBUG
net.sourceforge.squirrel_sql.client.session.SchemaInfo - Loading stored
procedures
38254 [Thread-4] DEBUG
net.sourceforge.squirrel_sql.client.session.SchemaInfo - stored procedures
loaded
38255 [Thread-4] DEBUG net.sourceforge.squirrel_sql.fw.util.TaskThreadPool
- Returning thread. 2 threads available
40864 [AWT-EventQueue-0] ERROR
net.sourceforge.squirrel_sql.fw.util.StringManager - No resource string
found for key 'SessionTextEditPopupMenu.makeeditable'
40895 [AWT-EventQueue-0] DEBUG
net.sourceforge.squirrel_sql.fw.util.Resources - No resource found for
action.net.sourceforge.squirrel_sql.client.session.action.UndoAction : image
40900 [AWT-EventQueue-0] DEBUG
net.sourceforge.squirrel_sql.fw.util.Resources - No resource found for
action.net.sourceforge.squirrel_sql.client.session.action.RedoAction : image
41318 [AWT-EventQueue-0] DEBUG
net.sourceforge.squirrel_sql.fw.util.Resources - No resource found for
action.net.sourceforge.squirrel_sql.client.gui.session.ToolsPopupAction :
image
42270 [AWT-EventQueue-0] DEBUG
net.sourceforge.squirrel_sql.client.session.mainpanel.BaseMainPanelTab -
Refreshing SQL main tab.
42484 [AWT-EventQueue-0] DEBUG
net.sourceforge.squirrel_sql.fw.util.TaskThreadPool - Reusing existing
thread
42501 [Thread-3] DEBUG net.sourceforge.squirrel_sql.fw.util.TaskThreadPool
- Using a thread. 1 threads available
42602 [AWT-EventQueue-0] ERROR
net.sourceforge.squirrel_sql.client.gui.session.SessionPanel - Unable to
retrieve catalog info
java.sql.SQLException: [unixODBC][FreeTDS][SQL Server]The database name
component of the object qualifier must be the name of the current database.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
at sun.jdbc.odbc.JdbcOdbc.SQLTables(JdbcOdbc.java:5519)
at
sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getTables(JdbcOdbcDatabaseMetaData.ja
va:2395)
at
sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getCatalogs(JdbcOdbcDatabaseMetaData.
java:2471)
at
net.sourceforge.squirrel_sql.fw.sql.SQLDatabaseMetaData.getCatalogs(SQLDatab
aseMetaData.java:468)
at
net.sourceforge.squirrel_sql.fw.gui.SQLCatalogsComboBox.setConnection(SQLCat
alogsComboBox.java:69)
at
net.sourceforge.squirrel_sql.client.gui.session.SessionPanel$MyToolBar.setup
CatalogsCombo(SessionPanel.java:534)
at
net.sourceforge.squirrel_sql.client.gui.session.SessionPanel$MyToolBar.acces
s$300(SessionPanel.java:445)
at
net.sourceforge.squirrel_sql.client.gui.session.SessionPanel$3.objectTreeRef
reshed(SessionPanel.java:467)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTree.
fireObjectTreeRefreshed(ObjectTree.java:658)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTree.
refresh(ObjectTree.java:255)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTreeP
anel.refreshTree(ObjectTreePanel.java:570)
at
net.sourceforge.squirrel_sql.client.gui.session.SessionPanel.addNotify(Sessi
onPanel.java:137)
at java.awt.Container.addNotify(Container.java:2500)
at javax.swing.JComponent.addNotify(JComponent.java:4436)
at java.awt.Container.addNotify(Container.java:2500)
at javax.swing.JComponent.addNotify(JComponent.java:4436)
at javax.swing.JRootPane.addNotify(JRootPane.java:680)
at java.awt.Container.addNotify(Container.java:2500)
at javax.swing.JComponent.addNotify(JComponent.java:4436)
at java.awt.Container.addImpl(Container.java:1052)
at javax.swing.JLayeredPane.addImpl(JLayeredPane.java:204)
at
net.sourceforge.squirrel_sql.client.gui.ScrollableDesktopPane.addImpl(Scroll
ableDesktopPane.java:66)
at java.awt.Container.add(Container.java:351)
at
net.sourceforge.squirrel_sql.client.gui.mainframe.MainFrame.addInternalFrame
(MainFrame.java:197)
at
net.sourceforge.squirrel_sql.client.gui.WindowManager.createInternalFrame(Wi
ndowManager.java:379)
at
net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$R
unner.run(ConnectToAliasCommand.java:446)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
va:234)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
:163)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
42907 [Thread-3] ERROR
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTree
- Error: Macola1_Free_ODBC
java.sql.SQLException: [unixODBC][FreeTDS][SQL Server]The database name
component of the object qualifier must be the name of the current database.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
at sun.jdbc.odbc.JdbcOdbc.SQLTables(JdbcOdbc.java:5519)
at
sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getTables(JdbcOdbcDatabaseMetaData.ja
va:2395)
at
sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getCatalogs(JdbcOdbcDatabaseMetaData.
java:2471)
at
net.sourceforge.squirrel_sql.fw.sql.SQLDatabaseMetaData.getCatalogs(SQLDatab
aseMetaData.java:468)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.expanders.D
atabaseExpander.createCatalogNodes(DatabaseExpander.java:173)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.expanders.D
atabaseExpander.createChildren(DatabaseExpander.java:125)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTree$
TreeLoader.loadChildren(ObjectTree.java:815)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTree$
TreeLoader.execute(ObjectTree.java:766)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTree.
expandNode(ObjectTree.java:398)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTree.
access$600(ObjectTree.java:65)
at
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTree$
ExpansionController.run(ObjectTree.java:717)
at
net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82)
at java.lang.Thread.run(Thread.java:595)
42940 [Thread-3] DEBUG net.sourceforge.squirrel_sql.fw.util.TaskThreadPool
- Returning thread. 2 threads available
----------------------------------------

I traced through the same connect, and this is what the trace log looks like
doing this:
---------------------------------------
[ODBC][16664][SQLTables.c][196]
Entry:
Statement = 178438
Catalog Name = [NULL]
Schema Name = [NULL]
Table Name = [%][length = 1 (SQL_NTS)]
Table Type = [NULL]
[ODBC][16664][SQLGetData.c][447]
Exit:[SQL_SUCCESS]
Buffer = [image]
Strlen Or Ind = f71012b4 -> 5
[ODBC][16664][SQLTables.c][408]
Exit:[SQL_ERROR]
[ODBC][16664][SQLFetch.c][158]
Entry:
Statement = 177e60
DIAG [24000] [FreeTDS][SQL Server]Invalid cursor state

[ODBC][16664][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][16664][SQLError.c][342]
Entry:
Statement = 178438
SQLState = 4c0150
Native = f6e00638
Message Text = 4de6b0
Buffer Length = 300
Text Len Ptr = f6e0063e
[ODBC][16664][SQLGetData.c][219]
Entry:
Statement = 177e60
Column Number = 1
Target Type = 1 SQL_CHAR
Buffer Length = 129
Target Value = 4de7e8
StrLen Or Ind = f71012b4
[ODBC][16664][SQLError.c][379]
Exit:[SQL_SUCCESS]
SQLState = 24000
Native = f6e00638 -> 0
Message Text = [[unixODBC][FreeTDS][SQL
Server]Invalid cursor state]
[ODBC][16664][SQLGetData.c][447]
Exit:[SQL_SUCCESS]
Buffer = [varbinary]
Strlen Or Ind = f71012b4 -> 9
[ODBC][16664][SQLFetch.c][158]
Entry:
Statement = 177e60
[ODBC][16664][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
[ODBC][16664][SQLGetData.c][219]
Entry:
Statement = 177e60
Column Number = 1
Target Type = 1 SQL_CHAR
Buffer Length = 129
Target Value = 4de640
StrLen Or Ind = f71012b4
[ODBC][16664][SQLGetData.c][447]
Exit:[SQL_SUCCESS]
Buffer = [binary]
Strlen Or Ind = f71012b4 -> 6
[ODBC][16664][SQLFetch.c][158]
Entry:
Statement = 177e60
[ODBC][16664][SQLFetch.c][340]
Exit:[SQL_SUCCESS]
--------------------------------------------------------------

I don't see any clues in there. Can you make more of this that I can?

Thanks,

David

-----Original Message-----
From: VZverev AT genesis.spb.ru [mailto:VZverev AT genesis.spb.ru]
Sent: Tuesday, November 01, 2005 7:31 AM
To: FreeTDS Development Group
Subject: Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC


Hi David,
Your explanations look like a standard ODBC puzzle.

> I am running SQuirreL SQL as a standalone JAVA app on Solaris
> 2.8 to test freeTDS, which I build from stable source using

I have the same SPARC Solaris 8 configuration as you described but sp_help,
sp_tables work properly in isql.
Before doing something weird with SQuirrelL via Jdbc-Odbc bridge you should
try:
1) tsql (native freetds tool)
bash-2.03# tsql -C
locale is
"/ru_RU.ISO8859-5/ru_RU.ISO8859-5/ru_RU.ISO8859-5/ru_RU.ISO8859-5/ru_RU.ISO8
859-5/C"
locale charset is "ISO8859-5"
Compile-time settings (established with the "configure" script):
Version: freetds v0.63.dev.20040213
MS db-lib source compatibility: no
Sybase binary compatibility: unknown
Thread safety: no
iconv library: yes
TDS version: 8.0
iODBC: no
unixodbc: yes
2) isql
isql --version
unixODBC 2.2.7

After all, SQuirrelL has a nice JDBC debug options (file->global
preferences->sql page).
Hope this help to figure out problem's cornerstone.

Sincerely yours.
-------------------------------------------------------
Vitaly Zverev, OCP DBA 8&8i
Oracle E-Business Suite &
Infiniband Linux Cluster Administrator
Genesis Ltd., St.Petersburg, Russia



> -----Original Message-----
> From: freetds-bounces AT lists.ibiblio.org
> [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Pickett, David
> Sent: Monday, October 31, 2005 5:22 PM
> To: 'FreeTDS Development Group'
> Subject: Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC
>
> Vitaly,
>
> I am running SQuirreL SQL as a standalone JAVA app on Solaris
> 2.8 to test freeTDS, which I build from stable source using
> my usual GNU and Sun pieces with very little hassle, as
> myself with my own prefix dir, not as root for default dirs.
> SQuirreL is , of course, a JDBC client, but it has a handy
> JDBC bridge for ODBC drivers. SQuirreL works fine with the
> MS JDBC jars, of course, so it's not a primary objective to
> use this in the final configuration, but merely to use it to
> test the ODBC driver. It's good to have alternatives!
>
> In the end, I want to use it as a Cognos 7 source under
> unixODBC in an ODBC-only config. Cognos has this half-MS
> half UNIX nature, where you develop on Windows and deploy to
> UNIX, and so seem to need mirror image data sources in both
> worlds to update reports. Cognos does have some
> database-specific knowledge, so it may have more savvy about
> extracting Metadata from SQL Server, sufficient for it's
> query-writing needs. Cognos 7 does not support or certify
> freeTDS as a source, but the price for the supported product
> for our configuration, juxtaposed with our modest needs, has
> generated some interest in alternatives. (Cognos 8 seems to
> be supporting JDBC, so this might not be a long term need, either.)
>
> I suspect this is a common hole in the matrix of target
> databases and client platforms, when moving database apps
> from Microsoft to UNIX: the client support for the Microsoft
> databases (SQL Server, Access, Excel, Text file) is missing.
> Frankly, I was a bit surprised that a UNIX ODBC was not free
> from MS, to increase the use of SQL Server! I suppose it is
> cutting your own throat to support UNIX as either client or
> server, if you sell parts for both. Of course, they are
> giving away the JDBC, so this is a bit soft. I am
> considering the Easysoft ODBC-JDBC Bridge as well as freeTDS,
> as it would support both SQL Server, Interbase 4.0, and most
> other 'discovered'
> connectivity needs.
>
> -----Original Message-----
> From: VZverev AT genesis.spb.ru [mailto:VZverev AT genesis.spb.ru]
> Sent: Saturday, October 29, 2005 12:42 PM
> To: FreeTDS Development Group
> Subject: Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC
>
>
> Hi, Devid
> If you mean SquirreL SQL
> (http://squirrel-sql.sourceforge.net) may I ask you about a
> little context explanation? AFAIK in regard of SquirreL it
> works splending with Eclipce 2,3 in JFaceDBc plugin (with
> jTds *JDBC* driver for
> example) and as standalone java application (sp_who, proc
> editor and so on).
> For what reason do you want to take ODBC stuff here?
>
> Sincerely yours.
> -------------------------------------------------------
> Vitaly Zverev, OCP DBA 8&8i
> Oracle E-Business Suite &
> Infiniband Linux Cluster Administrator
> Genesis Ltd., St.Petersburg, Russia
>
>
>
> > -----Original Message-----
> > From: freetds-bounces AT lists.ibiblio.org
> > [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of
> Pickett, David
> > Sent: Saturday, October 29, 2005 1:30 AM
> > To: 'freetds AT lists.ibiblio.org'
> > Subject: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC
> >
> > Hi,
> >
> > I was testing my build of stable freeTDS ODBC, under unixODBC in
> > ODBC-only mode to SQL Server under Windows 2000. While it seems to
> > work in many respects with isql and SQuirreL 2 so far, I cannot
> > sp_help or sp_tables.
> > Under SQuirreL the Objects Tree has only a root element and the
> > catalog
> > (schema) name is blank, regardless of how the default
> database is set
> > in .odbc.ini. Is there a trick to setting this up for
> SQuirreL, or is
> > this a freeTDS ODBC driver shortcoming?
> >
> > Best regards,
> >
> > David
> >
> > 1-215-496-5117
> > <<David Pickett (E-mail).vcf>>
> >
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds




Archive powered by MHonArc 2.6.24.

Top of Page