Re: Where is the Sybase ODBC driver

Igor Korot <[email protected]> Wed, 1 Feb 2017 18:57:33 -0500
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CA+FnnTwc2ZBoaS_bbLQeg_reSJTJiWtMDGk5R5c_mU7JBmZhxw@mail.gmail.com>
Hi, Matthew et al,

On Wed, Feb 1, 2017 at 2:50 AM,  <[email protected]> wrote:
> You've probably done this already but just in case.... have you checked using  Sybases isql that you can connect? Have you double checked that the server really is listening on the right port? To be absolutely certain you could look in syslisteners.
>
> Sorry to go back to basics but sometimes these things get overlooked.

Problem is solved.
Apparently the culprit is line "Server=localhost".

After setting it to the actual host name (Sybase by default set the
server name to be the same as a host name)
I moved further.

Thank you.

>
> Cheers,
>
> Matthew.
>
> February 1 2017 12:41 AM, "John Kendall" <[email protected]> wrote:
>> Igor,
>>
>> In you odbc.ini file you need:
>>
>> UserID=root
>>
>> not
>>
>> User=root
>>
>> (You could also put your username and password on the command line.)
>>
>> /usr/bin/isql -v "Sybase 16 test" root wasqra
>>
>> Other than that, all I can think of is make sure you source the SYBASE environment and use isql's
>> -v option to get more information.
>>
>> source /opt/sap/SYBASE.sh
>> /usr/bin/isql -v "Sybase 16 test" root wasqra
>>
>> That's all I know. Really!
>>
>> John
>>
>> On Jan 31, 2017, at 2:49 PM, Igor Korot <[email protected]> wrote:
>>
>>> Hi, John,
>>>
>>> On Thu, Jan 26, 2017 at 9:42 PM, John Kendall <[email protected]> wrote:
>>>> Igor,
>>>>
>>>> I think it's
>>>>
>>>> ./sap/DataAccess64/ODBC/lib/libsybdrvodb.so
>>>
>>> I put this in and tried to connect. Here are my configuration files:
>>>
>>> igor@IgorReinCloud ~/wxWidgets/buildGTK $ cat /etc/unixODBC/odbcinst.ini
>>> [ODBC]
>>> Trace=yes
>>> TraceFile=/tmp/sql.log
>>> Pooling=No
>>>
>>> [Sybase]
>>> Description=Sybase 16 Native Driver
>>> Driver=/opt/sap/DataAccess64/ODBC/lib/libsybdrvodb.so
>>> UsageCount=1
>>>
>>> igor@IgorReinCloud ~/wxWidgets/buildGTK $ cat /etc/unixODBC/odbc.ini
>>> [ODBC Data Sources]
>>> Sybase 16 test=Sybase 16 ODBC driver
>>>
>>> [Sybase 16 test]
>>> Description=Sybase 16 Driver Testing DSN
>>> Driver=Sybase
>>> Port=5000
>>> Server=localhost
>>> User=root
>>> Password=wasqra
>>> Database=draft
>>> Option=3
>>>
>>> Trying to connect I got:
>>>
>>> igor@IgorReinCloud ~/wxWidgets/buildGTK $ /usr/bin/isql "Sybase 16 test"
>>> [ISQL]ERROR: Could not SQLConnect
>>>
>>> Checking the log file I see:
>>>
>>> [quote]
>>>
>> [ODBC][16867][1485764524.804129][/var/tmp/portage/dev-db/unixODBC-2.3.2-r1/work/unixODBC-2.3.2/Drive
>>> Manager/__handles.c][460]
>>> Exit:[SQL_SUCCESS]
>>> Environment = 0x2253750
>>>
>> [ODBC][16867][1485764524.804240][/var/tmp/portage/dev-db/unixODBC-2.3.2-r1/work/unixODBC-2.3.2/Drive
>>> Manager/SQLAllocHandle.c][375]
>>> Entry:
>>> Handle Type = 2
>>> Input Handle = 0x2253750
>>>
>> [ODBC][16867][1485764524.804288][/var/tmp/portage/dev-db/unixODBC-2.3.2-r1/work/unixODBC-2.3.2/Drive
>>> Manager/SQLAllocHandle.c][493]
>>> Exit:[SQL_SUCCESS]
>>> Output Handle = 0x2254050
>>>
>> [ODBC][16867][1485764524.804334][/var/tmp/portage/dev-db/unixODBC-2.3.2-r1/work/unixODBC-2.3.2/Drive
>>> Manager/SQLConnect.c][3727]
>>> Entry:
>>> Connection = 0x2254050
>>> Server Name = [Sybase 16 test][length = 14 (SQL_NTS)]
>>> User Name = [NULL]
>>> Authentication = [NULL]
>>> UNICODE Using encoding ASCII 'UTF8' and UNICODE 'UTF16LE'
>>>
>>> DIAG [HY000] [SAP][ASE ODBC Driver]There is no server
>>> listening at localhost:5000.
>>>
>>> DIAG [08001] [SAP][ASE ODBC Driver]Client unable to establish
>>> a connection
>>> ]/quote]
>>>
>>> But it is here and listening:
>>>
>>> [code]
>>> IgorReinCloud / # netstat -nptl
>>> Active Internet connections (only servers)
>>> Proto Recv-Q Send-Q Local Address Foreign Address
>>> State PID/Program name
>>> tcp 0 0 127.0.0.1:4900 0.0.0.0:*
>>> LISTEN 6014/jsagent
>>> tcp 0 0 127.0.0.1:5000 0.0.0.0:*
>>> LISTEN 5979/dataserver
>>> tcp 0 0 0.0.0.0:139 0.0.0.0:*
>>> LISTEN 3491/smbd
>>> tcp 0 0 0.0.0.0:445 0.0.0.0:*
>>> LISTEN 3491/smbd
>>> tcp6 0 0 :::139 :::*
>>> LISTEN 3491/smbd
>>> tcp6 0 0 :::445 :::*
>>> LISTEN 3491/smbd
>>> [/code]
>>>
>>> So what I did wrong?
>>>
>>> Thank you.
>>>
>>>> But for it to work, you'll need to set up the Sybase environment by sourcing ./sap/SYBASE.sh:
>>>>
>>>> . ./sap/SYBASE.sh
>>>>
>>>> Hope this helps, because I'm out of ideas.
>>>> John
>>>>
>>>>> On Jan 26, 2017, at 8:56 PM, Igor Korot <[email protected]> wrote:
>>>>>
>>>>> Hi,
>>>>> I just installed Sybase ASE 16 Dev on my Linux box.
>>>>> Now I'm trying to set up a connection using native Sybase ODBC
>>>>> driver. However I have a hard time finding it.
>>>>>
>>>>> [code]
>>>>> igor@IgorReinCloud /opt $ find . -name *odbc*
>>>>> ./sap/DataAccess/bin/odbcversion
>>>>> ./sap/DataAccess/ODBC/samples/odbcbatch
>>>>> ./sap/DataAccess/ODBC/samples/odbcbatch/odbcbatch.cpp
>>>>> ./sap/DataAccess/ODBC/samples/odbcloblocator
>>>>> ./sap/DataAccess/ODBC/samples/odbcloblocator/odbcloblocator.cpp
>>>>> ./sap/DataAccess/ODBC/sp/odbc_mda_120.sql
>>>>> ./sap/DataAccess/ODBC/sp/odbc_mda_157.sql
>>>>> ./sap/DataAccess/ODBC/sp/odbc_mda_1251.sql
>>>>> ./sap/DataAccess/ODBC/sp/odbc_mda_1600000.sql
>>>>> ./sap/DataAccess/ODBC/sp/install_odbc_sprocs
>>>>> ./sap/DataAccess/ODBC/sp/odbc_mda_1570020.sql
>>>>> ./sap/DataAccess/ODBC/sp/odbc_mda_125.sql
>>>>> ./sap/DataAccess/ODBC/sp/odbc_mda_12503.sql
>>>>> ./sap/DataAccess/ODBC/sp/odbc_mda_150.sql
>>>>> ./sap/DataAccess/ODBC/sp/odbc_mda_1502.sql
>>>>> ./sap/DBISQL-16_0/lib/jodbc4.jar
>>>>> ./sap/DBISQL-16_0/bin/libdbodbc16_r.so.1
>>>>> ./sap/DBISQL-16_0/bin/libdbodbc16_r.so
>>>>> ./sap/DBISQL-16_0/bin/libdbjodbc16.so.1
>>>>> ./sap/DBISQL-16_0/bin/libdbjodbc16.so
>>>>> ./sap/ASE-16_0/lib/pca/libPCAodbc.so
>>>>> ./sap/ASE-16_0/symlib/pca/libPCAodbc.so
>>>>> ./sap/COCKPIT-4/bin/sa16/linux64/java/jodbc4.jar
>>>>> ./sap/COCKPIT-4/bin/sa16/linux64/lib64/libdbodbc16_r.so
>>>>> ./sap/COCKPIT-4/bin/sa16/linux64/lib64/libdbodbc16.so
>>>>> ./sap/COCKPIT-4/bin/sa16/linux64/lib64/libdbjodbc16.so
>>>>> ./sap/log/odbc.log
>>>>> ./sap/log/odbc.lst
>>>>> ./sap/DataAccess64/bin/odbcversion
>>>>> ./sap/DataAccess64/ODBC/dm/include/unixodbc.h
>>>>> ./sap/DataAccess64/ODBC/dm/include/odbc.h
>>>>> ./sap/DataAccess64/ODBC/dm/include/saodbc.h
>>>>> ./sap/DataAccess64/ODBC/dm/lib64/libodbc.so
>>>>> ./sap/DataAccess64/ODBC/samples/odbcbatch
>>>>> ./sap/DataAccess64/ODBC/samples/odbcbatch/odbcbatch.cpp
>>>>> ./sap/DataAccess64/ODBC/samples/odbcloblocator
>>>>> ./sap/DataAccess64/ODBC/samples/odbcloblocator/odbcloblocator.cpp
>>>>> ./sap/DataAccess64/ODBC/sp/odbc_mda_120.sql
>>>>> ./sap/DataAccess64/ODBC/sp/odbc_mda_157.sql
>>>>> ./sap/DataAccess64/ODBC/sp/odbc_mda_1251.sql
>>>>> ./sap/DataAccess64/ODBC/sp/odbc_mda_1600000.sql
>>>>> ./sap/DataAccess64/ODBC/sp/install_odbc_sprocs
>>>>> ./sap/DataAccess64/ODBC/sp/odbc_mda_1570020.sql
>>>>> ./sap/DataAccess64/ODBC/sp/odbc_mda_125.sql
>>>>> ./sap/DataAccess64/ODBC/sp/odbc_mda_12503.sql
>>>>> ./sap/DataAccess64/ODBC/sp/odbc_mda_150.sql
>>>>> ./sap/DataAccess64/ODBC/sp/odbc_mda_1502.sql
>>>>> [/code]
>>>>>
>>>>> Can anyone tell me which one is the Sybase ODBC driver?
>>>>>
>>>>> Thank you.
>>>>> _______________________________________________
>>>>> FreeTDS mailing list
>>>>> [email protected]
>>>>>
>>>>
>>>
>> https://url.serverdata.net/?ajZrMdQ0VsbeE8kMpqNYWHDt8NhXcTl0gExF9FI8Y1QGyylx0yNkuUl4kfJBSC8Cf02PCfXw
>>>>> nNlwUAw6zdbO8Q~~
>>>>
>>>> _______________________________________________
>>>> FreeTDS mailing list
>>>> [email protected]
>>>>
>>>
>> https://url.serverdata.net/?ajZrMdQ0VsbeE8kMpqNYWHDt8NhXcTl0gExF9FI8Y1QGyylx0yNkuUl4kfJBSC8Cf02PCfXw
>>>> nNlwUAw6zdbO8Q~~
>>>
>>> _______________________________________________
>>> FreeTDS mailing list
>>> [email protected]
>>>
>> https://url.serverdata.net/?ajZrMdQ0VsbeE8kMpqNYWHDt8NhXcTl0gExF9FI8Y1QGyylx0yNkuUl4kfJBSC8Cf02PCfXw
>>> nNlwUAw6zdbO8Q~~
>>
>> _______________________________________________
>> FreeTDS mailing list
>> [email protected]
>> http://lists.ibiblio.org/mailman/listinfo/freetds
> _______________________________________________
> FreeTDS mailing list
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds