I have a use case that requires me to make a join on a table t1 from Sybase ASE and table t2 from Sybase IQ . I am trying to achieve this by creating a proxy_table on Sybase IQ as follows:
create server SYB1 class 'ASAODBC' using Driver=libsyb64.so;Server=hostname;Port=portnum;PacketSize=16384; EnableServerPacketSize=0'
(I even tried above with 'ASEODBC' and 'ODBC' classes)
create external login XYZ to SYB1 remote login 'SYBASEASEusername' identified by SYBASEASEpwd' create existing table 'proxy_table_name' at 'SYB1.dbname.owner.tablename'
On firing above sqls I get: [Sybase][ODBC Driver][Sybase IQ] Unable to connect to 'SYB1': [Sybase][ODBC Driver] [SQL Anywhere] Unable to connect ; server definition is circular
I have entry for the above mentioned Sybase ASE host in interfaces file and I tried to create the server by specifying the server name itself but it failed nevertheless.
Any help appreciated.
asked 01 Mar '14, 01:37
The problem is that the SAP ODBC Driver Manager is not able to load the libsys64 driver for whatever reason and is therefore falling back on libodbc.so which is probably sym linked to the IQ ODBC Driver. Try removing the libodbc.so sym link and see if that gives you more information as to why the original driver could not be loaded. Also, it would be best if you specified the full path to the ASE ODBC driver instead of a relative path.
answered 04 Mar '14, 10:06
See Unable to connect, server definition is circular: You attempted to connect to a remote server that maps to the local database.
That means you are running CREATE SERVER on the same database as the USING clause is pointing to. In most cases that is a user error, which is probably why they don't let you do it.
Please note that this is a SQL Anywhere forum, not an IQ forum. Perhaps you've never heard of SQL Anywhere... that's OK, it's very much a stealth product.
If you are trying to to run a CREATE SERVER on a SQL Anywhere database that is pointing to an IQ database, use CLASS 'IQODBC'. CLASS 'ASEODBC' is for ASE and 'SAODBC' is for SQL Anywhere (CLASS 'ASAODBC' is not documented, at least for SQL Anywhere 16 it's not).
...which leads me to believe you are writing code to run on IQ rather than a really old version of SQL Anywhere (CLASS 'ASAODBC' exists on IQ as well as SQL Anywhere Version 9 and earlier.)
Google is your friend; a search on "Unable to connect, server definition is circular" leads directly to this IQ documentation page which says exactly the same thing, which is understandable because a large part of IQ (parser etcetera) comes from SQL Anywhere.
So, I'll bet you have either (a) named the wrong target database in the USING clause or (b) run the CREATE SERVER statement on the wrong database.
Do I win? Or will I have to eat Surströmming? :)