cancel
Showing results for 
Search instead for 
Did you mean: 

Couple of issues with Sybase installed on Linux

oneeyeman1
Participant
0 Kudos

Hi, All,

Not too long ago I downloaded and installed Sybase 16 on my Gentoo Linux box. The install went thru fine but when I tried to start and work with it I hit couple of issues.

1. I'm a developer and in my program I will try to connect to Sybase server thru the ODBC interface. I have unixODBC package installed so I created the appropriate DSN and started my software.

Unfortunately it failed to connect saying that the file /opt/sap/DataAccess64/ODBC/lib/libsybdrvodb.so is not found. The file however was present on my system and upon examining it with ldd I found that there is a missing "so" file. So I had to manually modify the LD_LIBRARY_PATH environment variable in order to fix dynamic linking.

It would be nice if the installer checks if the ODBC driver is being installed do that for me.

2. I have a big script that suppose to create a database and populate the data in thedifferent tables. However trying to create the database and running the script fails. I have a screenshot of the error and the script itself. I can send in both in order for someone to reproduce the problem. The crash occurred inside the GUI iSQL software. I started it, loaded the script and then tried to execute it.

I tried to contact someone fronm the technical support but unfortunately my try went un-noticed.

3. Going back to my program.

I created the database, couple of tables and put some data in coupple of them (just reduced the big script from issue 2 to bare minimal). Then I ran my software. Once again - I have a source code so I can send it to people to perform some test. But in order to test the cfonnectivity to the server I started the iSQL program from the unixODBC and tried to connect. The connection was successful, but when I tried to perform a simple SELECT statement I received a "Segmentation fault" on the console from the unixODBC.

Trying to work with Sybase iSQL there is no problem. Everything works.

As I said - I have all the source code and all configurations in order to reproduce all those 3 issues.

It would be nice if I get contacted by one of the Sybase developers for all those test cases, but if not I can live with some developer (not the DBA) to contact me to give the files and the complete scenarios.

All this was done on the Gentoo Linux with the Sybase 16 Developer Edition.

Thank you and sorry for the long post.

bob_gallo58
Participant

From what I can see you are not talking about accessing Sybase Direct Connect for ECDA but an ASE Database,
using the Sybase 16 Client Libraries on Linux, is this correct?

So you were not able to open an incident? (You stated that no one responded to you?)

Accepted Solutions (0)

Answers (2)

Answers (2)

oneeyeman1
Participant
0 Kudos

bob.gallo58

All my issues are with the Sybase ASE 16 on Linux doing either native Sybase ODBC driver with unixODBC (not the FreeTDS one) or with ISQL GUI interface.

About the incident - where do I go to file one? Should I pay anything to do that? Yes for the issue number 1 I tried to call and talk to representative. I even send her the script and the screenshot of the error I got. No responce were provided. I was never told that I can create an issue for the Sybase devs to investigate.

Issue #2 and #3 was just discovered as I just came back to testing the Sybase DBMS with ODBC.

I'm an independent contractor (meaning I don't work for a company) and that's why I don't have an Enterprise version of DB - only Development one. So hopefully the code is the same and the difference is only in the licensing terms.

Also, I couldn't find a way to post just a comment replying (like on SO), so I'm creating this post. If you can provide me a way how to respond to a comment it would be greatly appreciated.

Thank you.

dawn_kim
Contributor
0 Kudos

Hi Igor,


1. When you source the SYBASE.csh the odbc driver should have been added to LD_LIBRARY_PATH. If it wasn't then I need to know what version of the 16.0 SDK you downloaded to make sure there wasn't with the version you have. I have the current version and I can see the path is set in the SYBASE.csh file.

2. So you are using the odbc SQL tool that give you the error? Did you start a chat incident or a log a case so we could help you? Just so you know we also have a 30 minute slots for presentations and how too, also. I know there is and issue with passing null with the odbc driver and the odbc administration tool.

3. For the segmentation fault you might want to run strace and put this to a file it might help to figure out is causing the fault.

Thanks,
Dawn Kim

oneeyeman1
Participant
0 Kudos
dawn.kim

I'm sorry, but I can't find a button to reply to your answer. If there is a way please do let me know. TIA!

Now to answers:

1. Is it the result of "SELECT @@version" query?

2. For that I actually started the Sybase ISQL GUI tool, opened the script inside and tried to execute. I only tried to talk to representative over the phone. Where do I go to open the incident? Will I have to register again or I can use the same credentials? Should I pay you guys to open the incident?

3. I can run strace or gdb and produce the backtrace at the time of the segmentation fault. Just tell me whats best will work for you.

Once again - I'm running Sybase ASE Server version 16 Developer Edition on Gentoo Linux.

And of course if someone can tell me how to make a comment or reply to the answer it would be great.

Thank you.

oneeyeman1
Participant
0 Kudos

dawn.kim

Did you see my reply?

Want to comment?

Like I said - I don't know where to file a bug report or whether it is better to run strace or gdb.

Thank you.

dawn_kim
Contributor
0 Kudos

Hi,

I was out of the office so sorry I didn't reply.
1. Yes, it gives the version of ASE.

2. Are you just testing and downloading the free tools for testing than you most likely do not have an account. If you do have an account you should be able to login to this page and start incidents/chat/talk to an export and get downloads:

https://launchpad.support.sap.com/#. To start the above you do need maintenance contract or see if you can pay for this issue.

3. Either straace or gdb would work

Seems like the reply is working because you are getting these on the post.

Once I have the ASE version I can run a test to see what is going on.

What is the version of the odbc admin tool on that box?

Thanks,
Dawn Kim

oneeyeman1
Participant
0 Kudos

dawn.kim ,

That is OK.

Find all the answers below:

1.

[code]

1> select @@version
2> go

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Adaptive Server Enterprise/16.0 SP02 PL02/EBF 25320 SMP/P/x86_64/Enterprise Lin
ux/ase160sp02plx/2492/64-bit/FBO/Sat Nov 21 04:05:39 2015

(1 row affected)
1> exit

[/code]

[code]

[ebuild U ] dev-db/unixODBC-2.3.5-r1::gentoo [2.3.2-r1::gentoo] USE="minimal unicode -odbcmanual -static-libs" ABI_X86="32 (64) (-x32)" 1,596 KiB

[/code]

The current version of unixODBC is 2.3.2-r1 from gentoo repository.

[code]

igor@IgorReinCloud ~ $ 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 ~ $ cat /etc/unixODBC/odbc.ini
[ODBC Data Sources]
Sybase 16 test=Sybase 16 ODBC driver

[Sybase_16_test]
Description=MySQL ODBC 5.2 Driver Testing DSN
Driver=Sybase
Port=5000
Server=IGORREINCLOUD
UserID=sa
Password=wasqra
Database=draft
Option=3

[/code]

This is everything that is connected to issue #1. If you want anything else - do let me know.

oneeyeman1
Participant
0 Kudos

dawn.kim ,

2.

I am an independent (freelancer) software engineer. I got the developer edition of the Sybase DBMS because it was free of charge and I can keep it running to develop my software.

And therefore I don't have an account and I can't pay for this right now.

What I can do though is to drop the script I tried to run and the screenshot of the error I received somewhere on the public server (I presume you won't give me you own E-mail address, right?) and you can try to reproduce an error.

However, this is presuming that the Developer Edition and the Enterprise Edition of the Sybase ASE Server are the same code-wise and differ only on the License.

oneeyeman1
Participant
0 Kudos

dawn.kim ,

3.

Now finally below you can find the output of the executing the "strace isql Sybase_16_test sa <my_password>" and then trying to execute a following query "SELECT * FROM leagues;":

You can find the output in here:

https://paste.pound-python.org/show/qg5G7caFphIltbomBCzw/.

(Apparently posting it in here will be more than 10000 characters, so I just posted it online).

Thank you for looking into this.

oneeyeman1
Participant
0 Kudos

dawn.kim

Finally, one more thing.

I will not be around that laptop with the Sybase installed for the next 2 weeks.

I will reply to your answer when I get back from my vacation.

Thank you for looking into this.

oneeyeman1
Participant
0 Kudos

dawn.kim

I am back from my vacation.

Did you have a chance to look into all this?

Thank you.

dawn_kim
Contributor
0 Kudos

Hi,

Seems like you are connected to the ASE so I don't think that is the problem. I am not sure if this our issue or the code. So you are telling me you run this same code to your other database and it runs fine? From the trace it seems like it fails after the row of printed data. Do you see this line?

383.write(1, "| 1 | Demo - Roto (Auct"..., 293| 1 | Demo - Roto (Auction) | 1 | 1 | 1 | demo | 260 | 0 |

I am thinking you use gdb core and back trace to figure the line of code your where it fails.

http://www.unknownroad.com/rtfm/gdbtut/gdbsegfault.html

http://web.mit.edu/10.001/Web/Tips/tips_on_segmentation.html


Thanks,
Dawn Kim

oneeyeman1
Participant
0 Kudos

dawn.kim

Yes, I'm connected. The crash happens after executing the simple "SELECT..." query. And I believe this is what I said initially.

Also, there is no other databases - I'm using this database for development and testing.

I can try to do this for the sample database - I think I have it installed.

I will also try to run this under gdb and get the backtrace from the crash.

And what about the other 2 issues - specifically the issue 2. Where do you want me to put the screenshot and the script?

Just for the reference - I sent an e-mail with the script and the screenshot attached on 8 FEB 2017 to the shirley.yip@sap.com. If this lady is still there and you can talk to her you can dig this e-mail up. Otherwise let me know where to post those 2 documents for you to review.

Thank you.

oneeyeman1
Participant
0 Kudos

dawn.kim ,

Sorry for the delay - been busy.

Here is the gdb output for the crash:

[code]

igor@IgorReinCloud /opt/sap $ gdb --args isql Sybase_16_test sa wasqra
GNU gdb (Gentoo 7.10.1 vanilla) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from isql...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/isql Sybase_16_test sa wasqra
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> SELECT * FROM leagues;
+------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+------------+------------+-----------+------------+-------------+
| id | name | drafttype| scoringtype| roundvalues| leaguetype| salary | benchplayers|
+------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+------------+------------+-----------+------------+-------------+
| 1 | Demo - Roto (Auction) | 1 | 1 | 1 | demo | 260 | 0 |

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7717189 in raise () from /lib64/libpthread.so.0
(gdb) bt
#0 0x00007ffff7717189 in raise () from /lib64/libpthread.so.0
#1 0x00007ffff5ce9a8e in SybaseTds::ScratchBuffer::ReturnBuffer() ()
from /opt/sap/DataAccess64/ODBC/lib/libsybdrvodb.so
#2 0x00007ffff5c56cc5 in SybaseTds::TdsStreamReader::~TdsStreamReader() ()
from /opt/sap/DataAccess64/ODBC/lib/libsybdrvodb.so
#3 0x00007ffff5c8fb56 in SybaseTds::TDSFormat::SetReader(SybaseTds::TdsStreamReader*) () from /opt/sap/DataAccess64/ODBC/lib/libsybdrvodb.so
#4 0x00007ffff5c21b71 in SybaseTds::DataToken::Read(SybaseTds::Bindable*, unsigned char*, int) () from /opt/sap/DataAccess64/ODBC/lib/libsybdrvodb.so
#5 0x00007ffff5c4533c in SybaseTds::RowToken::Read() ()
from /opt/sap/DataAccess64/ODBC/lib/libsybdrvodb.so
#6 0x00007ffff5c43c4e in SybaseTds::RowManager::ReadData(SybaseTds::TdsBaseContext*, unsigned char, unsigned char*, int) ()
from /opt/sap/DataAccess64/ODBC/lib/libsybdrvodb.so
#7 0x00007ffff5c9fe4e in SybaseTds::TdsServerResultSet::Next() ()
from /opt/sap/DataAccess64/ODBC/lib/libsybdrvodb.so
#8 0x00007ffff5d33a91 in SybaseOdbc::OdbcResultSet::Next(unsigned int, unsigned int) () from /opt/sap/DataAccess64/ODBC/lib/libsybdrvodb.so
#9 0x00007ffff5d36f20 in SybaseOdbc::OdbcStatement::FetchCommon(unsigned int*, unsigned short*, unsigned int) ()
from /opt/sap/DataAccess64/ODBC/lib/libsybdrvodb.so
#10 0x00007ffff5d37033 in SybaseOdbc::OdbcStatement::Fetch() ()
from /opt/sap/DataAccess64/ODBC/lib/libsybdrvodb.so
#11 0x00007ffff5d37084 in SybaseOdbc::SynchronousFetcher::Fetch(SybaseOdbc::OdbcStatement*) () from /opt/sap/DataAccess64/ODBC/lib/libsybdrvodb.so
#12 0x00007ffff5d2a492 in SQLFetchWork(void*) ()
from /opt/sap/DataAccess64/ODBC/lib/libsybdrvodb.so
#13 0x00007ffff5d2965d in SQLFetch ()
from /opt/sap/DataAccess64/ODBC/lib/libsybdrvodb.so
#14 0x00007ffff7b85523 in SQLFetch () from /usr/lib64/libodbc.so.2
#15 0x000000000040363d in ?? ()
#16 0x000000000040427f in ?? ()
#17 0x0000000000401ea7 in ?? ()
#18 0x00007ffff73865f0 in __libc_start_main () from /lib64/libc.so.6
---Type <return> to continue, or q <return> to quit---

[/code]

I hope this backtrace will shed some light of what is going on.

Once again - I am running Development version of Sybase ASE 16.0. Hopefully this is not the case for the Enterprise Edition (paid version).

Thank you.

oneeyeman1
Participant
0 Kudos

dawn.kim ,

Also, as promised I installed the pubs2 sample database and below is the simple ODBC session (again from the native Sybase ODBC driver):

[code]

igor@IgorReinCloud /opt/sap $ isql Sybase_16_test sa wasqra
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> SELECT * FROM titles;
+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+---------+----------------------+----------------------+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------+---------+
| title_id | title | type | pub_id | price | advance | total_sales| notes | pubdate | contract|
+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+---------+----------------------+----------------------+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------+---------+
| BU1032 | The Busy Executive's Database Guide | business | 1389 | 19.9900 | 5000.0000 | 4095 | An overview of available database systems with emphasis on common business applications. Illustrated. | 1986-06-12 00:00:00.000| 1 |
| BU1111 | Cooking with Computers: Surreptitious Balance Sheets | business | 1389 | 11.9500 | 5000.0000 | 3876 | Helpful hints on how to use your electronic resources to the best advantage. | 1988-06-09 00:00:00.000| 1 |
| BU2075 | You Can Combat Computer Stress! | business | 0736 | 2.9900 | 10125.0000 | 18722 | The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations. | 1985-06-30 00:00:00.000| 1 |
| BU7832 | Straight Talk About Computers | business | 1389 | 19.9900 | 5000.0000 | 4095 | Annotated analysis of what computers can do for you: a no-hype guide for the critical user. | 1987-06-22 00:00:00.000| 1 |
| MC2222 | Silicon Valley Gastronomic Treats | mod_cook | 0877 | 19.9900 | 0.0000 | 2032 | Favorite recipes for quick, easy, and elegant meals, tried and tested by people who never have time to eat, let alone cook. | 1989-06-09 00:00:00.000| 1 |
| MC3021 | The Gourmet Microwave | mod_cook | 0877 | 2.9900 | 15000.0000 | 22246 | Traditional French gourmet recipes adapted for modern microwave cooking. | 1985-06-18 00:00:00.000| 1 |
| MC3026 | The Psychology of Computer Cooking | UNDECIDED | 0877 | 0877 | 0877 | 0877 | 0877 | 2018-06-25 18:43:08.940| 0 |
| PC1035 | But Is It User Friendly? | popular_comp | 1389 | 22.9500 | 7000.0000 | 8780 | A survey of software for the naive user, focusing on the 'friendliness' of each. | 1986-06-30 00:00:00.000| 1 |
| PC8888 | Secrets of Silicon Valley | popular_comp | 1389 | 20.0000 | 8000.0000 | 4095 | Muckraking reporting by two courageous women on the world's largest computer hardware and software manufacturers. | 1987-06-12 00:00:00.000| 1 |
| PC9999 | Net Etiquette | popular_comp | 1389 | 1389 | 1389 | 1389 | A must-read for computer conferencing debutantes! | 2018-06-25 18:43:08.973| 0 |
| PS1372 | Computer Phobic and Non-Phobic Individuals: Behavior Variations | psychology | 0877 | 21.5900 | 7000.0000 | 375 | A must for the specialist, this book examines the difference between those who hate and fear computers and those who think they are swell. | 1990-10-21 00:00:00.000| 1 |
| PS2091 | Is Anger the Enemy? | psychology | 0736 | 10.9500 | 2275.0000 | 2045 | Carefully researched study of the effects of strong emotions on the body. Metabolic charts included. | 1989-06-15 00:00:00.000| 1 |
| PS2106 | Life Without Fear | psychology | 0736 | 7.0000 | 6000.0000 | 111 | New exercise, meditation, and nutritional techniques that can reduce the shock of daily interactions. Popular audience. Sample menus included, exercise video available separately. | 1990-10-05 00:00:00.000| 1 |
| PS3333 | Prolonged Data Deprivation: Four Case Studies | psychology | 0736 | 19.9900 | 2000.0000 | 4072 | What happens when the data runs dry? Searching evaluations of information-shortage effects on heavy users. | 1988-06-12 00:00:00.000| 1 |
| PS7777 | Emotional Security: A New Algorithm | psychology | 0736 | 7.9900 | 4000.0000 | 3336 | Protecting yourself and your loved ones from undue emotional stress in the modern world. Use of computer and nutritional aids emphasized. | 1988-06-12 00:00:00.000| 1 |
| TC3218 | Onions, Leeks, and Garlic: Cooking Secrets of the Mediterranean | trad_cook | 0877 | 20.9500 | 7000.0000 | 375 | Profusely illustrated in color, this makes a wonderful gift book for a cuisine-oriented friend. | 1990-10-21 00:00:00.000| 1 |
| TC4203 | Fifty Years in Buckingham Palace Kitchens | trad_cook | 0877 | 11.9500 | 4000.0000 | 15096 | More anecdotes from the Queen's favorite cook describing life among English royalty. Recipes, techniques, tender vignettes. | 1985-06-12 00:00:00.000| 1 |
| TC7777 | Sushi, Anyone? | trad_cook | 0877 | 14.9900 | 8000.0000 | 4095 | Detailed instructions on improving your position in life by learning how to make authentic Japanese sushi in your spare time. 5-10% increase in number of friends per recipe reported from beta test. | 1987-06-12 00:00:00.000| 1 |
+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+---------+----------------------+----------------------+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------+---------+
SQLRowCount returns -1
18 rows fetched

[/code]

As you can see everything works as expected.

oneeyeman1
Participant
0 Kudos

dawn.kim

Just wanted to ket you know that I have a successful connection with the freeTDS ODBC driver as well as with the freeTDS ct-lib library:

[code]

igor@IgorReinCloud ~/dbhandler $ isql Sybase_16_freeTDS sa wasqra
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> SELECT * FROM leagues
+------------+-----------------------------------------------------------------------------------------------------+----------+------------+------------+-----------+------------+-------------+
| id | name | drafttype| scoringtype| roundvalues| leaguetype| salary | benchplayers|
+------------+-----------------------------------------------------------------------------------------------------+----------+------------+------------+-----------+------------+-------------+
| 1 | Demo - Roto (Auction) | 1 | 1 | 1 | demo | 260 | 0 |
| 2 | Demo - Roto (Draft) | 3 | 1 | 1 | demo | 260 | 0 |
| 3 | Demo - Points (Auction) | 1 | 2 | 1 | demo | 260 | 0 |
| 4 | Demo - Points (Draft) | 3 | 2 | 1 | demo | 260 | 0 |
+------------+-----------------------------------------------------------------------------------------------------+----------+------------+------------+-----------+------------+-------------+
SQLRowCount returns 4
4 rows fetched
SQL> quit

igor@IgorReinCloud ~/dbhandler $ 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

[Sybase_freeTDS]
Description=Sybase FreeTDS Driver
Driver=/usr/lib64/libtdsodbc.so
TDS_Version = 5
UsageCount=3

igor@IgorReinCloud ~/dbhandler $ cat /etc/unixODBC/odbc.ini
[ODBC Data Sources]
Sybase_16_demo=Sybase 16 ODBC driver
Sybase_16_test=Sybase 16 ODBC driver
Sybase_16_freeTDS=Sybase_freeTDS

[Sybase_16_demo]
Description=Sybase 16 ODBC Driver
Driver=Sybase
Port=5000
Server=IGORREINCLOUD
UserID=sa
Password=wasqra
Database=pubs2
Option=3

[Sybase_16_test]
Description=Sybase 16 ODBC native driver
Driver=Sybase
Port=5000
Server=IGORREINCLOUD
UserID=sa
Password=wasqra
Database=draft
Option=3

[Sybase_16_freeTDS]
Description=Sybase 16 freeTDS ODBC driver
Driver=Sybase_freeTDS
Port=5000
Server=IGORREINCLOUD
UserID=sa
Password=wasqra
Database=draft
Option=3

[/code]

Did you have a chance to look at gdb output? Or you were able to find my E-mail I referenced last time?

Thank you.

oneeyeman1
Participant
0 Kudos

dawn.kim ,

Hi,

Did you see my last reply?

I think that the backtrace I showed indicate the problem in the driver...