Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to execute SQLs from perl in two different databases Vertica and Db2. I connect to vertica using ODBC driver and to Db2 using DB2 driver. I connect to one database at a time and try to execute the same sqls in both database. When I connect to vertica first and execute the sql it works perfeclty then I issue the <my database handle>->disconnect. And try to connect to db2 to execute the same sql. But I get an error saying the odbc driver could not find the data source name. I think the perl program uses the same odbc driver to connect to Db2 eventhough I specially mention to use DB2 Driver. At the same time. When I execute the sql in DB2 first . It works perfectly but when I try to connect to vertica I am getting an error from IBM DB2 driver. Perl is not taking the odbc driver mentioned in the connection string. I use the disconnect after executing the sql in a database. MY doubt is there any constraint I have to use only one database driver type. Is there any limitation in perl in resetting the drivers used in perl program. Is there a way in perl to solve the issue.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Two Different Database types in Perl
by wjw (Priest) on Aug 03, 2014 at 05:37 UTC | |
|
Re: Using Two Different Database types in Perl
by erix (Prior) on Aug 03, 2014 at 05:26 UTC | |
|
Re: Using Two Different Database types in Perl
by roboticus (Chancellor) on Aug 04, 2014 at 18:56 UTC | |
|
Re: Using Two Different Database types in Perl
by locked_user sundialsvc4 (Abbot) on Aug 04, 2014 at 14:42 UTC |