Sybase ASE 15.0
"Federico Alves" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <054001c9961f$4ab8afe0$e02a0fa0$@com> |
I need to connect ODBC-Freetds to a Sybase ASE 15 server. What do have to use in terms of tds version? Is there any information or example that I may use? The server is located in the same box at port 5000. But I also need to be keep talking to SQL Server on a different connection, so the same binaries need to be used. Federico -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Monday, February 23, 2009 1:21 PM To: [email protected] Subject: FreeTDS Digest, Vol 73, Issue 30 Send FreeTDS mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit http://lists.ibiblio.org/mailman/listinfo/freetds or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of FreeTDS digest..." Today's Topics: 1. Re: Regarding MSSQL connection (James K. Lowden) 2. Re: Regarding MSSQL connection (Gopalakrishnan A.N) 3. ODBC SQLSetDescRec fix (Amir Shamsuddin) 4. Re: ODBC SQLSetDescRec fix (Frediano Ziglio) 5. freetds with DBD::Sybase using Apache (Gaurav Nangia) 6. Requesting Help with ODBC and DSN (Computos) ---------------------------------------------------------------------- Message: 1 Date: Mon, 23 Feb 2009 07:57:56 -0500 From: "James K. Lowden" <[email protected]> Subject: Re: [freetds] Regarding MSSQL connection To: FreeTDS Development Group <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset=US-ASCII Gopalakrishnan A.N wrote: > I am trying to connect MS SQL server, but it gets fails with SQL connect > error. ... I am attaching my > freetds.conf, odbc.ini and odbcinst.ini > Servername = 172.20.182.10 should be Servername = egServer70 The ODBC Servername connection property refers to a name in freetds.conf. (The osql script is intended to report mistakes like this.) HTH. --jkl ------------------------------ Message: 2 Date: Mon, 23 Feb 2009 18:33:09 +0530 From: "Gopalakrishnan A.N" <[email protected]> Subject: Re: [freetds] Regarding MSSQL connection To: FreeTDS Development Group <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset=ISO-8859-1 Thanks James, Let me check and will revert back. On Mon, Feb 23, 2009 at 6:27 PM, James K. Lowden <[email protected]>wrote: > Gopalakrishnan A.N wrote: > > I am trying to connect MS SQL server, but it gets fails with SQL connect > > error. ... I am attaching my > > freetds.conf, odbc.ini and odbcinst.ini > > > Servername = 172.20.182.10 > > should be > > Servername = egServer70 > > The ODBC Servername connection property refers to a name in freetds.conf. > > > (The osql script is intended to report mistakes like this.) > > HTH. > > --jkl > > _______________________________________________ > FreeTDS mailing list > [email protected] > http://lists.ibiblio.org/mailman/listinfo/freetds > -- Thank you with regards, Gopal, ------------------------------ Message: 3 Date: Mon, 23 Feb 2009 15:24:20 +0000 From: Amir Shamsuddin <[email protected]> Subject: [freetds] ODBC SQLSetDescRec fix To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset="iso-8859-1" Hi, I'm using freeTDS with sqlapi and using the odbc interface as recommended by sqlapi to connect to a MSSQL server. My program was crashing, so I tracked the issue back to a call made from sqlapi to the freeTDS SQLSetDescRec method. It seems that sqlapi and freetds disagree over the meaning of the nRecordNumber parameter, with sqlapi starting indexing at 1 and freetds starting at 0, with the end result that memory past the end of desc->records was being written to (and thus causing the crash). Looking at the MSDN ODBC reference http://msdn.microsoft.com/en-us/library/ms714675(VS.85).aspx it looks to me that nRecordNumber should start indexing at 1, with an index of 0 being reserved for the 'bookmark record', though I'm not sure what the bookmark record is.... so I modified freeTDS to adjust the offset before accessing the desc->records array (very simple patch attached) and this fixed my problem. hopefully this is a real bug report / patch and is helpful to you, regards, Amir PS I'm using freeTDS version 0.64, but the patch is against current CVS which still appears to have the same problem -- Amir Shamsuddin -------------- next part -------------- A non-text attachment was scrubbed... Name: setDescRec.patch Type: application/octet-stream Size: 1222 bytes Desc: not available Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20090223/574dd65d/att achment-0001.obj ------------------------------ Message: 4 Date: Mon, 23 Feb 2009 17:17:39 +0100 From: Frediano Ziglio <[email protected]> Subject: Re: [freetds] ODBC SQLSetDescRec fix To: FreeTDS Development Group <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset=UTF-8 2009/2/23 Amir Shamsuddin <[email protected]>: > Hi, > I'm using freeTDS with sqlapi and using the odbc interface as recommended by > sqlapi to connect to a MSSQL server. > > My program was crashing, so I tracked the issue back to a call made from > sqlapi to the freeTDS SQLSetDescRec method. It seems that sqlapi and freetds > disagree over the meaning of the nRecordNumber parameter, with sqlapi > starting indexing at 1 and freetds starting at 0, with the end result that > memory past the end of desc->records was being written to (and thus causing > the crash). > > Looking at the MSDN ODBC reference > http://msdn.microsoft.com/en-us/library/ms714675(VS.85).aspx it looks to me > that nRecordNumber should start indexing at 1, with an index of 0 being > reserved for the 'bookmark record', though I'm not sure what the bookmark > record is.... > > so I modified freeTDS to adjust the offset before accessing the > desc->records array (very simple patch attached) and this fixed my problem. > > hopefully this is a real bug report / patch and is helpful to you, > > regards, > > Amir > > PS I'm using freeTDS version 0.64, but the patch is against current CVS > which still appears to have the same problem > Thanks, patch is ok. Applied to 0.64, 0.82 and CVS HEAD. You can find post release patch at http://freetds.sourceforge.net/ (updated snapshot will be generated this nigth). Regards Frediano ------------------------------ Message: 5 Date: Mon, 23 Feb 2009 11:31:06 -0500 From: Gaurav Nangia <[email protected]> Subject: [freetds] freetds with DBD::Sybase using Apache To: [email protected] Message-ID: <OFA2D2F836.26D5B2E8-ON85257566.005A532F-85257566.005ABABB@dtcc.com> Content-Type: text/plain; charset="US-ASCII" I am using the DBD::Sybase module (v1.07) with freetds 0.63 in a cgi script that is launched from an Apache webserver. The cgi-script works fine from the command line where it is able to use the DBD module to connect to the backend database and provide the output from the DB. However, when I run it from the Apache webserver, it complains with the following errors - [Mon Feb 23 11:22:09 2009] [error] [client 172.22.88.176] install_driver(Sybase) failed: Can't load '/usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/auto/DBD/Sybase/Sybase.so ' for module DBD::Sybase: ld.so.1: /usr/local/bin/perl: fatal: libgcc_s.so.1: open failed: No such file or directory at /usr/local/lib/perl5/5.8.3/sun4-solaris/DynaLoader.pm line 229. [Mon Feb 23 11:22:09 2009] [error] [client 172.22.88.176] at (eval 3) line 3 [Mon Feb 23 11:22:09 2009] [error] [client 172.22.88.176] Compilation failed in require at (eval 3) line 3. [Mon Feb 23 11:22:09 2009] [error] [client 172.22.88.176] Perhaps a required shared library or dll isn't installed where expected [Mon Feb 23 11:22:09 2009] [error] [client 172.22.88.176] at /opt/apache/cgi-bin/dmz_summary.cgi line 25 [Mon Feb 23 11:22:09 2009] [error] [client 172.22.88.176] Premature end of script headers: dmz_summary.cgi Here is a copy of the script - !/usr/local/bin/perl BEGIN { $ENV{'SYBASE'} = "/usr/local/freetds"; $ENV{'LD_LIBRARY_PATH'} = "/usr/lib:/usr/local/lib:/usr/local/freetds/lib:/opt1/netcool/platform/solar is2/lib"; $ENV{'SHLIB_PATH'} = "/usr/lib:/usr/local/lib:/usr/local/freetds/lib:/opt1/netcool/platform/solar is2/lib"; $ENV{'LIBPATH'} ="/opt1/netcool/platform/solaris2/lib"; } use DBI; use strict; use warnings; my $log = "/tmp/gntest"; open(LOG, "> $log"); my $objectserver = "DEVPNCOMS"; my $user = "xxxx"; my $password = "yyyy"; my $omni_dbh = DBI->connect("dbi:Sybase:server=$objectserver", "$user", "$password", {PrintError => 0}); if (!$omni_dbh) { #exit 1; } print LOG "Connected to primary objectserver: $objectserver\n"; my $sth = $omni_dbh->prepare("select count(Node) from alerts.status"); my $total = 0; if($sth->execute) { while (my $res = $sth->fetchrow_arrayref) { $total = $res->[0]; } } print LOG "Total is $total\n"; close(LOG); $omni_dbh->disconnect(); print "Content-type: text/html\n\n"; print <<__HTML__; <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>DMZ Status</title> </head> <body> __HTML__ print "<p>Total: $total</p>"; print <<__HTML__; </body> </html> __HTML__ ====================================== When I run from command line, here is what I get - tmebatp4:root:/opt/apache/cgi-bin>./dmz_summary.cgi Content-type: text/html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>DMZ Status</title> </head> <body> <p>Total: 458</p></body> </html> ============================= Any help would be appreciated. Regards, Gaurav Nangia The Depository Trust & Clearing Corporation Management and Network Security (212) 855 - 2317 ----------------------------------------- ________________________________________________________ DTCC DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify us immediately and delete the email and any attachments from your system. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. ------------------------------ Message: 6 Date: Mon, 23 Feb 2009 15:15:50 -0200 From: Computos <[email protected]> Subject: [freetds] Requesting Help with ODBC and DSN To: [email protected] Message-ID: <1235409350.6296.33.camel@Ventas01-SF-L> Content-Type: text/plain Hello everybody from Argentina! I will try to explain to you my problem with DSN and ODBC under Ubuntu I have a proprietary application running under windows 2000 sp4 and the latest sql server application. My problem is that I've installed Ubuntu in a workstation and it's hard to me to configure the System DSN. Maybe I am wrong setting up proper driver for ODBC in the workstation or I don't know nothing. Anyway I request from you a proper odbc.ini and odbcinst.ini files configuration. if it is possible. For best understand i send attached a configuration of my DSN in windows, then you can teach me how replace it in Ubuntu. I have installed unixODBC and freeTDS in my Ubuntu Workstation. DSN COnfiguration: ----> (in win Workstation) * 1st Page Name: dsnPrincipal Description: Main Database Server: SERVERSQL\AUTOPACK * 2nd Page Loggin ID: sa Password: (no password) * 3rd Page x Change the dafault database ---> (Checked) Principal This is the most important, i guess. Well that's all, appreciate any kind of help about this. Sorry my English please Regards Alberto ------------------------------ _______________________________________________ FreeTDS mailing list [email protected] http://lists.ibiblio.org/mailman/listinfo/freetds End of FreeTDS Digest, Vol 73, Issue 30 ***************************************