Talk:Get a database handle

From ClassDBI

Jump to: navigation, search

dbiproxy

since a few weeks i get a different db-handle, whenever i call db_Main:

use strict;
use warnings;
use Data::Dumper;
use DBI;
use base 'Class::DBI::Oracle';

__PACKAGE__->connection(
'dbi:Proxy:hostname=my.domain.com;port=12400;dsn=DBI:Oracle:schema',
        'user', 'pwd', { AutoCommit => 0, RaiseError => 1 }
    );
print __PACKAGE__->db_Main, "\n";
print __PACKAGE__->db_Main, "\n";
__PACKAGE__->db_Main->do(
    q{ alter session set nls_date_format = 'yyyy-mm-dd hh24:mi:ss' });
__PACKAGE__->sequence('seq');
print "NLS_PARAMETERS=", Dumper(
    __PACKAGE__->db_Main->selectall_hashref(
        q{ select *
             from v$nls_parameters
            where parameter = 'NLS_DATE_FORMAT' },
        'parameter',
    )
);

the result is

DBIx::ContextualFetch::db=HASH(0x85292f4)
DBIx::ContextualFetch::db=HASH(0x8517bc4)
NLS_PARAMETERS=$VAR1 = {
          'NLS_DATE_FORMAT' => {
                                 'parameter' => 'NLS_DATE_FORMAT',
                                 'value' => 'DD.MM.RR'
                               }
        };

In the last 12 months the script worked at debian-testing.

Maybe the problem was a dbiproxy in Version 1.50, while the Client was using DBI 1.51.
--MO 15:59, 27 June 2006 (BST)
Personal tools