Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Accessing a non-data-dictionary ADC on Windows from Linux?

6 posts in ODBC Last posting was on 2010-06-14 14:35:25.0Z
Chris Curvey Posted on 2010-06-02 19:30:53.0Z
Date: Wed, 02 Jun 2010 15:30:53 -0400
From: Chris Curvey <chris@chriscurvey.com>
User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228)
MIME-Version: 1.0
Newsgroups: Advantage.ODBC
Subject: Accessing a non-data-dictionary ADC on Windows from Linux?
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 98.109.125.19
Message-ID: <4c06b0d6@solutions.advantagedatabase.com>
X-Trace: 2 Jun 2010 13:28:22 -0700, 98.109.125.19
Lines: 17
Path: solutions.advantagedatabase.com!98.109.125.19
Xref: solutions.advantagedatabase.com Advantage.ODBC:1882
Article PK: 1133258

I see a few messages in this group about accessing an ADS database on
Windows from Linux. Has anyone had any success doing this with database
tables that are not data-dictionary based but just a directory full of
.adt .adm and .adi files? (If this is not possible, I'd like to know
before I start out on what would be a fool's errand.)

If it did work, I would assume that the strategy would be:

1) On the Windows server, permit sharing of the directory containing the
.adt files
2) On the Linux box, mount the shared directory as a CIFS/Samba share.
3) On the Linux box, install UnixODBC and the adsodbc driver for linux
4) Configure the odbc.ini and odbcinst.ini files (if anyone has a
sample, I'd love to see it
5) Test the connection by trying to run isql.

Does that sound about right?


Edgar Sherman Posted on 2010-06-02 22:26:20.0Z
From: "Edgar Sherman" <no@email.com>
Newsgroups: Advantage.ODBC
References: <4c06b0d6@solutions.advantagedatabase.com>
In-Reply-To: <4c06b0d6@solutions.advantagedatabase.com>
Subject: Re: Accessing a non-data-dictionary ADC on Windows from Linux?
Date: Wed, 2 Jun 2010 16:26:20 -0600
Lines: 2
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8117.416
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416
NNTP-Posting-Host: 10.24.34.181
Message-ID: <4c06d9ed@solutions.advantagedatabase.com>
X-Trace: 2 Jun 2010 16:23:41 -0700, 10.24.34.181
Path: solutions.advantagedatabase.com!10.24.34.181
Xref: solutions.advantagedatabase.com Advantage.ODBC:1883
Article PK: 1133259

Yes it will work, but I have a few notes for you.

> 1) On the Windows server, permit sharing of the directory containing the
> .adt files
> 2) On the Linux box, mount the shared directory as a CIFS/Samba share.

Not necessary. Look at using a server side alias
http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10/index.html?master_server_side_aliases.htm
Create an adsserver.ini in you error log directory with the following three
lines
[ServerAliases]
myalias=c:\path\to\freetable\folder

When you create the DSN entry for the odbc.ini file be sure to turn off
rights checking (default in 10). See below.

> 3) On the Linux box, install UnixODBC and the adsodbc driver for linux
The adsodbc linux driver had/has a problem with UnixODBC. 10 should work
fine with it (I admit to not testing it and verify yet but I have been told
good things :) ), and 9.1 should be fixed in the next service release.

> 4) Configure the odbc.ini and odbcinst.ini files (if anyone has a sample,
> I'd love to see it
Help file has a good example that I have used before
http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10/odbc_odbc_data_source_entries_for_linux.htm

Change the
Driver=/home/odbcuser/lib/libadsodbc.so.6
to be (I can't remember the path off the top of my head, so double check it)
Driver=/usr/lib/libadsodbc.so
My only additional suggestion would be to add RightsChecking=OFF

Here is a listing to all the key values you can set
http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10/odbc_odbc_data_source_keys.htm



It has been some time since I set everything up. I generally have had good
luck with iODBC, but as I mentioned the issues with unixODBC should be fixed
in 10 and a forthcoming fix in 9.1.

Edgar

"Chris Curvey" <chris@chriscurvey.com> wrote in message
news:4c06b0d6@solutions.advantagedatabase.com...
> I see a few messages in this group about accessing an ADS database on
> Windows from Linux. Has anyone had any success doing this with database
> tables that are not data-dictionary based but just a directory full of
> .adt .adm and .adi files? (If this is not possible, I'd like to know
> before I start out on what would be a fool's errand.)
>
> If it did work, I would assume that the strategy would be:
>
> 1) On the Windows server, permit sharing of the directory containing the
> .adt files
> 2) On the Linux box, mount the shared directory as a CIFS/Samba share.
> 3) On the Linux box, install UnixODBC and the adsodbc driver for linux
> 4) Configure the odbc.ini and odbcinst.ini files (if anyone has a sample,
> I'd love to see it
> 5) Test the connection by trying to run isql.
>
> Does that sound about right?


Chris Curvey Posted on 2010-06-03 02:41:03.0Z
Date: Wed, 02 Jun 2010 22:41:03 -0400
From: Chris Curvey <chris@chriscurvey.com>
User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228)
MIME-Version: 1.0
Newsgroups: Advantage.ODBC
Subject: Re: Accessing a non-data-dictionary ADC on Windows from Linux?
References: <4c06b0d6@solutions.advantagedatabase.com> <4c06d9ed@solutions.advantagedatabase.com>
In-Reply-To: <4c06d9ed@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.84.187.76
Message-ID: <4c0715a1@solutions.advantagedatabase.com>
X-Trace: 2 Jun 2010 20:38:25 -0700, 67.84.187.76
Lines: 151
Path: solutions.advantagedatabase.com!67.84.187.76
Xref: solutions.advantagedatabase.com Advantage.ODBC:1884
Article PK: 1133260


Edgar Sherman wrote:
> Yes it will work, but I have a few notes for you.

Thanks very much.

>
>> 1) On the Windows server, permit sharing of the directory containing
>> the .adt files
>> 2) On the Linux box, mount the shared directory as a CIFS/Samba share.
>
> Not necessary. Look at using a server side alias
> http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10/index.html?master_server_side_aliases.htm

Do server-side aliases work with Advantage 9? (The database is used by
a 3rd party application, and they have not given us the go-ahead to
upgrade to V10 yet.)

>
> Create an adsserver.ini in you error log directory with the following
> three lines
> [ServerAliases]
> myalias=c:\path\to\freetable\folder

Okay. My Advantage 9 server is on a machine called "kappa", and the
directories are set up as:

c:\advantagedb\databases\test1 <-- table "foobar.adt" lives here
c:\advantagedb\logfiles <-- "adsserver.ini" lives here

;
; adsserver.ini
;
[ServerAlias]
advantage=c:\advantagedb\databases

>
> When you create the DSN entry for the odbc.ini file be sure to turn off
> rights checking (default in 10). See below.

So on my Linux box, I have uninstalled unixODBC and installed iODBC. My
/etc/odbc.ini contains:

;
; /etc/odbc.ini
;
[ODBC Data Sources]
Foobar = Advantage ODBC Driver

[Foobar]
Driver=/usr/lib/libadsodbc.so
DataDirectory=\\kappa\advantage\test1
Description=Advantage ODBC Driver
Rows=False
MemoBlockSize=64
DefaultType=Advantage
MaxTableCloseCache=0
LOCKING=Record
CharSet=OEM
ADVANTAGELOCKING=Off
ServerTypes=2
TableExtension=

There is an /etc/odbcinst.ini, which contains

;
; /etc/odbcinst.ini
;
[AdvantageDatabase]
Description=Advantage ODBC Database
Driver=/usr/lib/libadsodbc.so

Now I run "iodbctest DSN=Foobar" and I get:

iODBC Demonstration Program
This program shows an interactive SQL processor
Driver Manager 03.52.0607.1008
1: SQLDriverConnect = [iAnywhereSolutions][Advantage SQL][ASA] Error
6060: Advantage Database Server not available on specified server.
axServerConnect (6060) SQLSTATE=HY000
1: ODBC_Connect = [iAnywhereSolutions][Advantage SQL][ASA] Error 6060:
Advantage Database Server not available on specified server.
axServerConnect (6060) SQLSTATE=HY000

Have a nice day.

(My day would be nicer if I got a connection.)

I've tried a few variations for DataDirectory, but I'm not getting any
joy. Any ideas?

P.S. I can "telnet kappa 6262" and get a response, so I know that TCP
connections go through the Windows firewall.

P.P.S. Just for future reference, the ADS driver does not work on 64-bit
linux. There might be a way to make it work, but I thought it easier to
switch to a 32-bit machine for the time being.



>
>> 3) On the Linux box, install UnixODBC and the adsodbc driver for linux
> The adsodbc linux driver had/has a problem with UnixODBC. 10 should
> work fine with it (I admit to not testing it and verify yet but I have
> been told good things :) ), and 9.1 should be fixed in the next service
> release.
>
>> 4) Configure the odbc.ini and odbcinst.ini files (if anyone has a
>> sample, I'd love to see it
> Help file has a good example that I have used before
> http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10/odbc_odbc_data_source_entries_for_linux.htm
>
>
> Change the
> Driver=/home/odbcuser/lib/libadsodbc.so.6
> to be (I can't remember the path off the top of my head, so double check
> it)
> Driver=/usr/lib/libadsodbc.so
> My only additional suggestion would be to add RightsChecking=OFF
>
> Here is a listing to all the key values you can set
> http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10/odbc_odbc_data_source_keys.htm
>
>
>
>
> It has been some time since I set everything up. I generally have had
> good luck with iODBC, but as I mentioned the issues with unixODBC should
> be fixed in 10 and a forthcoming fix in 9.1.
>
> Edgar
>
> "Chris Curvey" <chris@chriscurvey.com> wrote in message
> news:4c06b0d6@solutions.advantagedatabase.com...
>> I see a few messages in this group about accessing an ADS database on
>> Windows from Linux. Has anyone had any success doing this with
>> database tables that are not data-dictionary based but just a
>> directory full of .adt .adm and .adi files? (If this is not possible,
>> I'd like to know before I start out on what would be a fool's errand.)
>>
>> If it did work, I would assume that the strategy would be:
>>
>> 1) On the Windows server, permit sharing of the directory containing
>> the .adt files
>> 2) On the Linux box, mount the shared directory as a CIFS/Samba share.
>> 3) On the Linux box, install UnixODBC and the adsodbc driver for linux
>> 4) Configure the odbc.ini and odbcinst.ini files (if anyone has a
>> sample, I'd love to see it
>> 5) Test the connection by trying to run isql.
>>
>> Does that sound about right?
>


Edgar Sherman Posted on 2010-06-03 20:45:27.0Z
From: "Edgar Sherman" <no@email.com>
Newsgroups: Advantage.ODBC
References: <4c06b0d6@solutions.advantagedatabase.com> <4c06d9ed@solutions.advantagedatabase.com> <4c0715a1@solutions.advantagedatabase.com>
In-Reply-To: <4c0715a1@solutions.advantagedatabase.com>
Subject: Re: Accessing a non-data-dictionary ADC on Windows from Linux?
Date: Thu, 3 Jun 2010 14:45:27 -0600
Lines: 3
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8117.416
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416
NNTP-Posting-Host: 10.24.34.181
Message-ID: <4c0813c7@solutions.advantagedatabase.com>
X-Trace: 3 Jun 2010 14:42:47 -0700, 10.24.34.181
Path: solutions.advantagedatabase.com!10.24.34.181
Xref: solutions.advantagedatabase.com Advantage.ODBC:1885
Article PK: 1133262

ADS 9 uses Server Side aliases as well. I think they were introduced in 8.

For the 6060 error check that your machinename (the linux machine) has an
entry in the /etc/hosts file that points to the real IP address (not just
the 127 address). You might also try adding in the windows machine, but I
don't believe that is needed.

ADS 9 and earlier only had a 32 bit odbc driver. ADS 10 has a 64 bit
version, but I have not tried that. You should still be able to use it on a
64 bit machine, but you may need to install the 32 bit linux libraries as a
lot of distributions don't include them by default.

You may consider changing your path to include the port ADS is running on
like
\\kappa:6262\advantage\test1

Also, by default, ADS Clients communicate over UDP and not TCP. You can
change the communication type by adding this key to your DSN entry
CommType=TCP_IP

Edgar

"Chris Curvey" <chris@chriscurvey.com> wrote in message
news:4c0715a1@solutions.advantagedatabase.com...
> Edgar Sherman wrote:
>> Yes it will work, but I have a few notes for you.
>
> Thanks very much.
>
>>
>>> 1) On the Windows server, permit sharing of the directory containing the
>>> .adt files
>>> 2) On the Linux box, mount the shared directory as a CIFS/Samba share.
>>
>> Not necessary. Look at using a server side alias
>> http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10/index.html?master_server_side_aliases.htm
>
> Do server-side aliases work with Advantage 9? (The database is used by a
> 3rd party application, and they have not given us the go-ahead to upgrade
> to V10 yet.)
>
>>
>> Create an adsserver.ini in you error log directory with the following
>> three lines
>> [ServerAliases]
>> myalias=c:\path\to\freetable\folder
>
> Okay. My Advantage 9 server is on a machine called "kappa", and the
> directories are set up as:
>
> c:\advantagedb\databases\test1 <-- table "foobar.adt" lives here
> c:\advantagedb\logfiles <-- "adsserver.ini" lives here
>
> ;
> ; adsserver.ini
> ;
> [ServerAlias]
> advantage=c:\advantagedb\databases
>
>>
>> When you create the DSN entry for the odbc.ini file be sure to turn off
>> rights checking (default in 10). See below.
>
> So on my Linux box, I have uninstalled unixODBC and installed iODBC. My
> /etc/odbc.ini contains:
>
> ;
> ; /etc/odbc.ini
> ;
> [ODBC Data Sources]
> Foobar = Advantage ODBC Driver
>
> [Foobar]
> Driver=/usr/lib/libadsodbc.so
> DataDirectory=\\kappa\advantage\test1
> Description=Advantage ODBC Driver
> Rows=False
> MemoBlockSize=64
> DefaultType=Advantage
> MaxTableCloseCache=0
> LOCKING=Record
> CharSet=OEM
> ADVANTAGELOCKING=Off
> ServerTypes=2
> TableExtension=
>
> There is an /etc/odbcinst.ini, which contains
>
> ;
> ; /etc/odbcinst.ini
> ;
> [AdvantageDatabase]
> Description=Advantage ODBC Database
> Driver=/usr/lib/libadsodbc.so
>
> Now I run "iodbctest DSN=Foobar" and I get:
>
> iODBC Demonstration Program
> This program shows an interactive SQL processor
> Driver Manager 03.52.0607.1008
> 1: SQLDriverConnect = [iAnywhereSolutions][Advantage SQL][ASA] Error 6060:
> Advantage Database Server not available on specified server.
> axServerConnect (6060) SQLSTATE=HY000
> 1: ODBC_Connect = [iAnywhereSolutions][Advantage SQL][ASA] Error 6060:
> Advantage Database Server not available on specified server.
> axServerConnect (6060) SQLSTATE=HY000
>
> Have a nice day.
>
> (My day would be nicer if I got a connection.)
>
> I've tried a few variations for DataDirectory, but I'm not getting any
> joy. Any ideas?
>
> P.S. I can "telnet kappa 6262" and get a response, so I know that TCP
> connections go through the Windows firewall.
>
> P.P.S. Just for future reference, the ADS driver does not work on 64-bit
> linux. There might be a way to make it work, but I thought it easier to
> switch to a 32-bit machine for the time being.
>
>
>
>>
>>> 3) On the Linux box, install UnixODBC and the adsodbc driver for linux
>> The adsodbc linux driver had/has a problem with UnixODBC. 10 should work
>> fine with it (I admit to not testing it and verify yet but I have been
>> told good things :) ), and 9.1 should be fixed in the next service
>> release.
>>
>>> 4) Configure the odbc.ini and odbcinst.ini files (if anyone has a
>>> sample, I'd love to see it
>> Help file has a good example that I have used before
>> http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10/odbc_odbc_data_source_entries_for_linux.htm
>> Change the
>> Driver=/home/odbcuser/lib/libadsodbc.so.6
>> to be (I can't remember the path off the top of my head, so double check
>> it)
>> Driver=/usr/lib/libadsodbc.so
>> My only additional suggestion would be to add RightsChecking=OFF
>>
>> Here is a listing to all the key values you can set
>> http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10/odbc_odbc_data_source_keys.htm
>> It has been some time since I set everything up. I generally have had
>> good luck with iODBC, but as I mentioned the issues with unixODBC should
>> be fixed in 10 and a forthcoming fix in 9.1.
>>
>> Edgar
>>
>> "Chris Curvey" <chris@chriscurvey.com> wrote in message
>> news:4c06b0d6@solutions.advantagedatabase.com...
>>> I see a few messages in this group about accessing an ADS database on
>>> Windows from Linux. Has anyone had any success doing this with database
>>> tables that are not data-dictionary based but just a directory full of
>>> .adt .adm and .adi files? (If this is not possible, I'd like to know
>>> before I start out on what would be a fool's errand.)
>>>
>>> If it did work, I would assume that the strategy would be:
>>>
>>> 1) On the Windows server, permit sharing of the directory containing the
>>> .adt files
>>> 2) On the Linux box, mount the shared directory as a CIFS/Samba share.
>>> 3) On the Linux box, install UnixODBC and the adsodbc driver for linux
>>> 4) Configure the odbc.ini and odbcinst.ini files (if anyone has a
>>> sample, I'd love to see it
>>> 5) Test the connection by trying to run isql.
>>>
>>> Does that sound about right?
>>


Chris Curvey Posted on 2010-06-04 20:39:20.0Z
Date: Fri, 04 Jun 2010 16:39:20 -0400
From: Chris Curvey <chris@chriscurvey.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4
MIME-Version: 1.0
Newsgroups: Advantage.ODBC
Subject: Re: Accessing a non-data-dictionary ADC on Windows from Linux?
References: <4c06b0d6@solutions.advantagedatabase.com> <4c06d9ed@solutions.advantagedatabase.com> <4c0715a1@solutions.advantagedatabase.com> <4c0813c7@solutions.advantagedatabase.com>
In-Reply-To: <4c0813c7@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.84.187.76
Message-ID: <4c0963d8@solutions.advantagedatabase.com>
X-Trace: 4 Jun 2010 14:36:40 -0700, 67.84.187.76
Lines: 191
Path: solutions.advantagedatabase.com!67.84.187.76
Xref: solutions.advantagedatabase.com Advantage.ODBC:1887
Article PK: 1133261

Drat. I've tried all kinds of things to no avail. I keep getting a
6060 error. I turned on tracing, and the first message in the trace is:

[000002.039864]
iodbctest B77F6B20 EXIT SQLDriverConnect with return code -1
(SQL_ERROR)
SQLHDBC 0x8636768
SQLPOINTER 0x0
SQLCHAR * 0xbf9c946d
SQLSMALLINT -3 (SQL_NTS)
SQLCHAR * 0x808e3c0
SQLSMALLINT 4096
SQLSMALLINT * 0xbf9c946a
SQLUSMALLINT 1 (SQL_DRIVER_COMPLETE)

not sure if anyone can help me interpret this.

On 06/03/2010 04:45 PM, Edgar Sherman wrote:
> ADS 9 uses Server Side aliases as well. I think they were introduced in 8.
>
> For the 6060 error check that your machinename (the linux machine) has
> an entry in the /etc/hosts file that points to the real IP address (not
> just the 127 address). You might also try adding in the windows machine,
> but I don't believe that is needed.
>
> ADS 9 and earlier only had a 32 bit odbc driver. ADS 10 has a 64 bit
> version, but I have not tried that. You should still be able to use it
> on a 64 bit machine, but you may need to install the 32 bit linux
> libraries as a lot of distributions don't include them by default.
>
> You may consider changing your path to include the port ADS is running
> on like
> \\kappa:6262\advantage\test1
>
> Also, by default, ADS Clients communicate over UDP and not TCP. You can
> change the communication type by adding this key to your DSN entry
> CommType=TCP_IP
>
> Edgar
>
> "Chris Curvey" <chris@chriscurvey.com> wrote in message
> news:4c0715a1@solutions.advantagedatabase.com...
>> Edgar Sherman wrote:
>>> Yes it will work, but I have a few notes for you.
>>
>> Thanks very much.
>>
>>>
>>>> 1) On the Windows server, permit sharing of the directory containing
>>>> the .adt files
>>>> 2) On the Linux box, mount the shared directory as a CIFS/Samba share.
>>>
>>> Not necessary. Look at using a server side alias
>>> http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10/index.html?master_server_side_aliases.htm
>>>
>>
>> Do server-side aliases work with Advantage 9? (The database is used by
>> a 3rd party application, and they have not given us the go-ahead to
>> upgrade to V10 yet.)
>>
>>>
>>> Create an adsserver.ini in you error log directory with the following
>>> three lines
>>> [ServerAliases]
>>> myalias=c:\path\to\freetable\folder
>>
>> Okay. My Advantage 9 server is on a machine called "kappa", and the
>> directories are set up as:
>>
>> c:\advantagedb\databases\test1 <-- table "foobar.adt" lives here
>> c:\advantagedb\logfiles <-- "adsserver.ini" lives here
>>
>> ;
>> ; adsserver.ini
>> ;
>> [ServerAlias]
>> advantage=c:\advantagedb\databases
>>
>>>
>>> When you create the DSN entry for the odbc.ini file be sure to turn
>>> off rights checking (default in 10). See below.
>>
>> So on my Linux box, I have uninstalled unixODBC and installed iODBC.
>> My /etc/odbc.ini contains:
>>
>> ;
>> ; /etc/odbc.ini
>> ;
>> [ODBC Data Sources]
>> Foobar = Advantage ODBC Driver
>>
>> [Foobar]
>> Driver=/usr/lib/libadsodbc.so
>> DataDirectory=\\kappa\advantage\test1
>> Description=Advantage ODBC Driver
>> Rows=False
>> MemoBlockSize=64
>> DefaultType=Advantage
>> MaxTableCloseCache=0
>> LOCKING=Record
>> CharSet=OEM
>> ADVANTAGELOCKING=Off
>> ServerTypes=2
>> TableExtension=
>>
>> There is an /etc/odbcinst.ini, which contains
>>
>> ;
>> ; /etc/odbcinst.ini
>> ;
>> [AdvantageDatabase]
>> Description=Advantage ODBC Database
>> Driver=/usr/lib/libadsodbc.so
>>
>> Now I run "iodbctest DSN=Foobar" and I get:
>>
>> iODBC Demonstration Program
>> This program shows an interactive SQL processor
>> Driver Manager 03.52.0607.1008
>> 1: SQLDriverConnect = [iAnywhereSolutions][Advantage SQL][ASA] Error
>> 6060: Advantage Database Server not available on specified server.
>> axServerConnect (6060) SQLSTATE=HY000
>> 1: ODBC_Connect = [iAnywhereSolutions][Advantage SQL][ASA] Error 6060:
>> Advantage Database Server not available on specified server.
>> axServerConnect (6060) SQLSTATE=HY000
>>
>> Have a nice day.
>>
>> (My day would be nicer if I got a connection.)
>>
>> I've tried a few variations for DataDirectory, but I'm not getting any
>> joy. Any ideas?
>>
>> P.S. I can "telnet kappa 6262" and get a response, so I know that TCP
>> connections go through the Windows firewall.
>>
>> P.P.S. Just for future reference, the ADS driver does not work on
>> 64-bit linux. There might be a way to make it work, but I thought it
>> easier to switch to a 32-bit machine for the time being.
>>
>>
>>
>>>
>>>> 3) On the Linux box, install UnixODBC and the adsodbc driver for linux
>>> The adsodbc linux driver had/has a problem with UnixODBC. 10 should
>>> work fine with it (I admit to not testing it and verify yet but I
>>> have been told good things :) ), and 9.1 should be fixed in the next
>>> service release.
>>>
>>>> 4) Configure the odbc.ini and odbcinst.ini files (if anyone has a
>>>> sample, I'd love to see it
>>> Help file has a good example that I have used before
>>> http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10/odbc_odbc_data_source_entries_for_linux.htm
>>> Change the
>>> Driver=/home/odbcuser/lib/libadsodbc.so.6
>>> to be (I can't remember the path off the top of my head, so double
>>> check it)
>>> Driver=/usr/lib/libadsodbc.so
>>> My only additional suggestion would be to add RightsChecking=OFF
>>>
>>> Here is a listing to all the key values you can set
>>> http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10/odbc_odbc_data_source_keys.htm
>>> It has been some time since I set everything up. I generally have had
>>> good luck with iODBC, but as I mentioned the issues with unixODBC
>>> should be fixed in 10 and a forthcoming fix in 9.1.
>>>
>>> Edgar
>>>
>>> "Chris Curvey" <chris@chriscurvey.com> wrote in message
>>> news:4c06b0d6@solutions.advantagedatabase.com...
>>>> I see a few messages in this group about accessing an ADS database
>>>> on Windows from Linux. Has anyone had any success doing this with
>>>> database tables that are not data-dictionary based but just a
>>>> directory full of .adt .adm and .adi files? (If this is not
>>>> possible, I'd like to know before I start out on what would be a
>>>> fool's errand.)
>>>>
>>>> If it did work, I would assume that the strategy would be:
>>>>
>>>> 1) On the Windows server, permit sharing of the directory containing
>>>> the .adt files
>>>> 2) On the Linux box, mount the shared directory as a CIFS/Samba share.
>>>> 3) On the Linux box, install UnixODBC and the adsodbc driver for linux
>>>> 4) Configure the odbc.ini and odbcinst.ini files (if anyone has a
>>>> sample, I'd love to see it
>>>> 5) Test the connection by trying to run isql.
>>>>
>>>> Does that sound about right?
>>>


Edgar Sherman Posted on 2010-06-14 14:35:25.0Z
From: "Edgar Sherman" <no@email.com>
Newsgroups: Advantage.ODBC
References: <4c06b0d6@solutions.advantagedatabase.com> <4c06d9ed@solutions.advantagedatabase.com> <4c0715a1@solutions.advantagedatabase.com> <4c0813c7@solutions.advantagedatabase.com> <4c0963d8@solutions.advantagedatabase.com>
In-Reply-To: <4c0963d8@solutions.advantagedatabase.com>
Subject: Re: Accessing a non-data-dictionary ADC on Windows from Linux?
Date: Mon, 14 Jun 2010 08:35:25 -0600
Lines: 2
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8117.416
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416
NNTP-Posting-Host: 10.24.34.181
Message-ID: <4c163d89@solutions.advantagedatabase.com>
X-Trace: 14 Jun 2010 08:32:41 -0700, 10.24.34.181
Path: solutions.advantagedatabase.com!10.24.34.181
Xref: solutions.advantagedatabase.com Advantage.ODBC:1888
Article PK: 1133264

Really beyond firewalls or the hosts file I have not seen much else that
would cause a 6060. You could try a network sniff and see where packets are
going and verify nothing is blocking them.

Edgar

"Chris Curvey" <chris@chriscurvey.com> wrote in message
news:4c0963d8@solutions.advantagedatabase.com...
> Drat. I've tried all kinds of things to no avail. I keep getting a 6060
> error. I turned on tracing, and the first message in the trace is:
>
> [000002.039864]
> iodbctest B77F6B20 EXIT SQLDriverConnect with return code -1
> (SQL_ERROR)
> SQLHDBC 0x8636768
> SQLPOINTER 0x0
> SQLCHAR * 0xbf9c946d
> SQLSMALLINT -3 (SQL_NTS)
> SQLCHAR * 0x808e3c0
> SQLSMALLINT 4096
> SQLSMALLINT * 0xbf9c946a
> SQLUSMALLINT 1 (SQL_DRIVER_COMPLETE)
>
> not sure if anyone can help me interpret this.
>
>
> On 06/03/2010 04:45 PM, Edgar Sherman wrote:
>> ADS 9 uses Server Side aliases as well. I think they were introduced in
>> 8.
>>
>> For the 6060 error check that your machinename (the linux machine) has
>> an entry in the /etc/hosts file that points to the real IP address (not
>> just the 127 address). You might also try adding in the windows machine,
>> but I don't believe that is needed.
>>
>> ADS 9 and earlier only had a 32 bit odbc driver. ADS 10 has a 64 bit
>> version, but I have not tried that. You should still be able to use it
>> on a 64 bit machine, but you may need to install the 32 bit linux
>> libraries as a lot of distributions don't include them by default.
>>
>> You may consider changing your path to include the port ADS is running
>> on like
>> \\kappa:6262\advantage\test1
>>
>> Also, by default, ADS Clients communicate over UDP and not TCP. You can
>> change the communication type by adding this key to your DSN entry
>> CommType=TCP_IP
>>
>> Edgar
>>
>> "Chris Curvey" <chris@chriscurvey.com> wrote in message
>> news:4c0715a1@solutions.advantagedatabase.com...
>>> Edgar Sherman wrote:
>>>> Yes it will work, but I have a few notes for you.
>>>
>>> Thanks very much.
>>>
>>>>
>>>>> 1) On the Windows server, permit sharing of the directory containing
>>>>> the .adt files
>>>>> 2) On the Linux box, mount the shared directory as a CIFS/Samba share.
>>>>
>>>> Not necessary. Look at using a server side alias
>>>> http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10/index.html?master_server_side_aliases.htm
>>>>
>>>
>>> Do server-side aliases work with Advantage 9? (The database is used by
>>> a 3rd party application, and they have not given us the go-ahead to
>>> upgrade to V10 yet.)
>>>
>>>>
>>>> Create an adsserver.ini in you error log directory with the following
>>>> three lines
>>>> [ServerAliases]
>>>> myalias=c:\path\to\freetable\folder
>>>
>>> Okay. My Advantage 9 server is on a machine called "kappa", and the
>>> directories are set up as:
>>>
>>> c:\advantagedb\databases\test1 <-- table "foobar.adt" lives here
>>> c:\advantagedb\logfiles <-- "adsserver.ini" lives here
>>>
>>> ;
>>> ; adsserver.ini
>>> ;
>>> [ServerAlias]
>>> advantage=c:\advantagedb\databases
>>>
>>>>
>>>> When you create the DSN entry for the odbc.ini file be sure to turn
>>>> off rights checking (default in 10). See below.
>>>
>>> So on my Linux box, I have uninstalled unixODBC and installed iODBC.
>>> My /etc/odbc.ini contains:
>>>
>>> ;
>>> ; /etc/odbc.ini
>>> ;
>>> [ODBC Data Sources]
>>> Foobar = Advantage ODBC Driver
>>>
>>> [Foobar]
>>> Driver=/usr/lib/libadsodbc.so
>>> DataDirectory=\\kappa\advantage\test1
>>> Description=Advantage ODBC Driver
>>> Rows=False
>>> MemoBlockSize=64
>>> DefaultType=Advantage
>>> MaxTableCloseCache=0
>>> LOCKING=Record
>>> CharSet=OEM
>>> ADVANTAGELOCKING=Off
>>> ServerTypes=2
>>> TableExtension=
>>>
>>> There is an /etc/odbcinst.ini, which contains
>>>
>>> ;
>>> ; /etc/odbcinst.ini
>>> ;
>>> [AdvantageDatabase]
>>> Description=Advantage ODBC Database
>>> Driver=/usr/lib/libadsodbc.so
>>>
>>> Now I run "iodbctest DSN=Foobar" and I get:
>>>
>>> iODBC Demonstration Program
>>> This program shows an interactive SQL processor
>>> Driver Manager 03.52.0607.1008
>>> 1: SQLDriverConnect = [iAnywhereSolutions][Advantage SQL][ASA] Error
>>> 6060: Advantage Database Server not available on specified server.
>>> axServerConnect (6060) SQLSTATE=HY000
>>> 1: ODBC_Connect = [iAnywhereSolutions][Advantage SQL][ASA] Error 6060:
>>> Advantage Database Server not available on specified server.
>>> axServerConnect (6060) SQLSTATE=HY000
>>>
>>> Have a nice day.
>>>
>>> (My day would be nicer if I got a connection.)
>>>
>>> I've tried a few variations for DataDirectory, but I'm not getting any
>>> joy. Any ideas?
>>>
>>> P.S. I can "telnet kappa 6262" and get a response, so I know that TCP
>>> connections go through the Windows firewall.
>>>
>>> P.P.S. Just for future reference, the ADS driver does not work on
>>> 64-bit linux. There might be a way to make it work, but I thought it
>>> easier to switch to a 32-bit machine for the time being.
>>>
>>>
>>>
>>>>
>>>>> 3) On the Linux box, install UnixODBC and the adsodbc driver for linux
>>>> The adsodbc linux driver had/has a problem with UnixODBC. 10 should
>>>> work fine with it (I admit to not testing it and verify yet but I
>>>> have been told good things :) ), and 9.1 should be fixed in the next
>>>> service release.
>>>>
>>>>> 4) Configure the odbc.ini and odbcinst.ini files (if anyone has a
>>>>> sample, I'd love to see it
>>>> Help file has a good example that I have used before
>>>> http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10/odbc_odbc_data_source_entries_for_linux.htm
>>>> Change the
>>>> Driver=/home/odbcuser/lib/libadsodbc.so.6
>>>> to be (I can't remember the path off the top of my head, so double
>>>> check it)
>>>> Driver=/usr/lib/libadsodbc.so
>>>> My only additional suggestion would be to add RightsChecking=OFF
>>>>
>>>> Here is a listing to all the key values you can set
>>>> http://devzone.advantagedatabase.com/dz/WebHelp/Advantage10/odbc_odbc_data_source_keys.htm
>>>> It has been some time since I set everything up. I generally have had
>>>> good luck with iODBC, but as I mentioned the issues with unixODBC
>>>> should be fixed in 10 and a forthcoming fix in 9.1.
>>>>
>>>> Edgar
>>>>
>>>> "Chris Curvey" <chris@chriscurvey.com> wrote in message
>>>> news:4c06b0d6@solutions.advantagedatabase.com...
>>>>> I see a few messages in this group about accessing an ADS database
>>>>> on Windows from Linux. Has anyone had any success doing this with
>>>>> database tables that are not data-dictionary based but just a
>>>>> directory full of .adt .adm and .adi files? (If this is not
>>>>> possible, I'd like to know before I start out on what would be a
>>>>> fool's errand.)
>>>>>
>>>>> If it did work, I would assume that the strategy would be:
>>>>>
>>>>> 1) On the Windows server, permit sharing of the directory containing
>>>>> the .adt files
>>>>> 2) On the Linux box, mount the shared directory as a CIFS/Samba share.
>>>>> 3) On the Linux box, install UnixODBC and the adsodbc driver for linux
>>>>> 4) Configure the odbc.ini and odbcinst.ini files (if anyone has a
>>>>> sample, I'd love to see it
>>>>> 5) Test the connection by trying to run isql.
>>>>>
>>>>> Does that sound about right?
>>>>
>