Re: Oracle 11R2, perl-DBD: eating signal CTRL-C

2011-05-03 Thread Martin J. Evans

On 27/04/11 15:33, Ulrich Weiss wrote:

Hello!

Yes, the problem exists also with DBD::Oracle 1.27.
With my test machine, I have checked following environments:

Failed:
11R2, DBD 1.28, DBI-1.613-1.fc14
11R2, DBD 1.27, DBI-1.613-1.fc14
11R2, DBD 1.22, DBI-1.613-1.fc14
11R2, DBD 1.22, DBI-1.607 (RHEL 5.3, 64bit)

Ok:
11R1, DBD 1.28, DBI-1.613-1.fc14
11R1, DBD 1.22, DBI-1.613-1.fc14
11R1, DBD 1.22, DBI-1.607 (RHEL 5.3, 64bit)

Am Mittwoch, 27. April 2011, 15:53:51 schrieben Sie:

There was some changes on SIG handling in 1.28 (you will have to ask Martin
about the details it was his fix)

I read your Oracle post. Just to fully remove DBI and DBD::Oracle  from the
picture can you try the same code/oracle 11g client but this time use
DBD::Oracle 1.27

That would but it all in Oracle's court then

Cheers
John Scoles


From: ulrich.we...@gmx.at
To: dbi-users@perl.org
Subject: Oracle 11R2, perl-DBD: eating signal CTRL-C
Date: Wed, 27 Apr 2011 15:42:40 +0200

Hello!

I'm new in this list, but I have found a problem, perhaps a bug in perl
DBD. Please can you look at following link:
http://forums.oracle.com/forums/thread.jspa?messageID=9521449

I thought of a problem in the oracle-lib, but it may be (also) in DBD.
Can someone please tell me anything about this behaviour?

greetings
Ulrich Weiss




This is an old issue but the signals involved change depending on the version 
of the oracle client. Sometimes, SIGINT, sometimes SIGCHLD - others have 
reported other signals (search this list for +signal +oracle and you'll see 
many).  Often it depends on how you connect.

We have the following old knowledge base article on our site - 
http://www.easysoft.com/support/kb/kb00967.html

You can use ora_connect_with_default_signals to save the signal disposition but 
I'm always wary of this this - the client libs must be using the signal for 
something.

Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com


Re: (Fwd) Perl DBI on Mac OS X

2011-05-03 Thread Martin J. Evans

On 03/05/11 03:47, Tim Bunce wrote:

- Forwarded message from david_st...@mcafee.com -

Date: Mon, 2 May 2011 18:40:11 -0700 From: david_st...@mcafee.com To:
tim.bu...@pobox.com Subject: Perl DBI on Mac OS X

Hi Tim,

Sorry to bother you. I am new to Perl DBI. I have it working fine on
my Windows 7 box.

I have installed the module on Ubuntu and tried running the same test
script but get a connection error:

DBI connect('Driver={SQL
Server};Server=[dsn];Database=[db]','[pwd]',...) failed:
[iODBC][Driver Manager]Specified driver could not be loaded
(SQL-IM003) [state was IM003 now 0]

[iODBC][Driver Manager]dlopen({SQL Server}, 6): image not found
(SQL-0) at testDBI.pl line 14

Can't connect to DBI:ODBC:Driver={SQL
Server};Server=[dsn];Database=[db]: [iODBC][Driver Manager]Specified
driver could not be loaded (SQL-IM003) [state was IM003 now 0]

[iODBC][Driver Manager]dlopen({SQL Server}, 6): image not found
(SQL-0) at testDBI.pl line 14.

Do I need to install another module? Or configure ODBC?

Thanks,

David Stiff

- End forwarded message -


I don't use iODBC myself or a MAC but dlopen image not found suggests to me that 
wherever your iODBC config file points the SQL Server entry to the path/name of the 
shared object is wrong or you don't have all the dependencies to load it (on Linux I'd run ldd on 
the shared object pointed to but I don't know the equivalent on MAC).

Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com


Re: (Fwd) Perl DBI on Mac OS X

2011-05-03 Thread Jonathan Leffler
On Tue, May 3, 2011 at 10:53, david_st...@mcafee.com wrote:

 Comments in-line

 Now you have to get down to - which ODBC drivers do you have installed?
  How can I check?


I don't know.  The chances are that if you're using iODBC, it has a way to
do that - maybe via the isql tool.



 Do you need the FreeTDS driver, for example?

  Probably not. Right now I am using ‘sqlcmd’ from Clapper Software. I may
 have installed FreeTDS when I was initially trying to get DB access working.
 However, I don’t want to do anything that disables ‘sqlcmd’.

 So the Clapper SQLCMD program is able to connect?  Can you see the DSN
(connection information) it is using?  If so, can you use that, or minor
variations on that, to connect via other programs?

If you're using iODBC, the isql program should allow you to test
connections.



 What is the recommended course of action? Do I need to install/uninstall
 something? Or is it an ODBC configuration setting I need to change?


In my view (not by any means definitive since I've not actually done it for
the setup you have), you should ensure that you can connect to the DBMS (DB)
using just the ODBC software -- probably using isql or something similar.
Only when you have that ironed out should you try bringing Perl into the
picture.

My general rule of thumb is:

* Get the DB connection working without Perl (+ DBI + DBD::WhatEver)
* Then get it working with Perl (+ DBI + DBD::WhatEver)

The DBD::Informix Makefile.PL enshrines that viewpoint - it compiles a test
program to ensure that you have the software it needs and that you can
connect to some test database before it creates the Makefile needed to build
DBD::Informix.  It has saved me endless grief as we separate database
connectivity issues in general from connectivity via Perl.  If you can't
connect without Perl, there's no reason to think you'll be successful with
Perl.  If you can connect without Perl, then the scope of the problems with
Perl is generally simpler.


Good luck,
Jonathan



 *From:* Jonathan Leffler [mailto:jonathan.leff...@gmail.com]
 *Sent:* Tuesday, May 03, 2011 11:47 AM
 *To:* Stiff, David
 *Cc:* dbi-users@perl.org

 *Subject:* Re: (Fwd) Perl DBI on Mac OS X





 On Tue, May 3, 2011 at 08:15, david_st...@mcafee.com wrote:

 Sorry. I meant to say Leopard, not Ubuntu.


 MacOS X it is, then...


 I am running a test script that lists the drivers and then connects to list
 the tables. I get this:



 *$ perl testdbi.pl *



 Driver: DBM

 Driver: ExampleP

 Driver: File

 Driver: Gofer

 Driver: ODBC

 Driver: Proxy

 Driver: Sponge


 That says you've got the Perl + DBI + DBD::ODBC combination installed.  You
 even have an ODBC driver manager installed.

 Now you have to get down to - which ODBC drivers do you have installed?

 Do you need the FreeTDS driver, for example?




 DBI connect('Driver={SQL 
 Server};Server=database.domain.com;Database=MyDB','readonly',...)
 failed: [iODBC][Driver Manager]Specified driver could not be loaded
 (SQL-IM003) [state was IM003 now 0]

 [iODBC][Driver Manager]dlopen({SQL Server}, 6): image not found (SQL-0)
 at testdbi.pl line 14

 Can't connect to DBI:ODBC:Driver={SQL 
 Server};Server=database.domain.com;Database=MyDB:
 [iODBC][Driver Manager]Specified driver could not be loaded (SQL-IM003)
 [state was IM003 now 0]

 [iODBC][Driver Manager]dlopen({SQL Server}, 6): image not found (SQL-0)
 at testdbi.pl line 14.



 Thanks,

 David



 *From:* Jonathan Leffler [mailto:jonathan.leff...@gmail.com]
 *Sent:* Tuesday, May 03, 2011 10:27 AM
 *To:* Stiff, David; dbi-users@perl.org
 *Subject:* Re: (Fwd) Perl DBI on Mac OS X (or Ubuntu?)





 On Mon, May 2, 2011 at 19:47, Tim Bunce tim.bu...@pobox.com wrote:

 - Forwarded message from david_st...@mcafee.com -

 Date: Mon, 2 May 2011 18:40:11 -0700
 From: david_st...@mcafee.com
 To: tim.bu...@pobox.com
 Subject: Perl DBI on Mac OS X

   [...] I am new to Perl DBI. I have it working fine on my Windows 7 box.

   I have installed the module on Ubuntu and tried running the same test
 script but get a connection error:


 Your subject line says 'MacOS X'; your comment here says 'Ubuntu'.  AFAIK,
 those are not synonyms.

 Which platform are you actually having the problems on?


   DBI connect('Driver={SQL Server};Server=[dsn];Database=[db]','[pwd]',...)
 failed: [iODBC][Driver
   Manager]Specified driver could not be loaded (SQL-IM003) [state was IM003
 now 0]

   [iODBC][Driver Manager]dlopen({SQL Server}, 6): image not found
 (SQL-0) at testDBI.pl line 14

   Can't connect to DBI:ODBC:Driver={SQL Server};Server=[dsn];Database=[db]:
 [iODBC][Driver
   Manager]Specified driver could not be loaded (SQL-IM003) [state was IM003
 now 0]

   [iODBC][Driver Manager]dlopen({SQL Server}, 6): image not found
 (SQL-0) at testDBI.pl line 14.

   Do I need to install another module? Or configure ODBC?



 Can you write a pure ODBC program that connects to your database?  If so,
 what DSN do you use