Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^5: DBI throwing segmentation fault

by marto (Cardinal)
on Nov 29, 2018 at 13:18 UTC ( [id://1226498]=note: print w/replies, xml ) Need Help??


in reply to Re^4: DBI throwing segmentation fault
in thread DBI throwing segmentation fault

I trust you rebuild DBI/DBD::Oracle under 5.22 and didn't copy the files? Set export DBI_TRACE=9 then run a basic connection script:

use strict; use warnings; use DBI; # declare your sid, user, pass etc variables here; my $dbh = DBI->connect("dbi:Oracle:host=$host;sid=$sid", $user, $passw +d );

Specify the versions of DBI/DBD::Oracle, the version of instant client, the output of perl -V, maybe even the build log of cpanm DBD::Oracle. Remember the code/data formatting and readmore tags. How do I post a question effectively?

Update fixed link..

Replies are listed 'Best First'.
Re^6: DBI throwing segmentation fault
by Tux (Canon) on Nov 29, 2018 at 13:42 UTC

    I'd try to use $TWO_TASK i.c.w. $ORACLE_HOME/network/admin/tnsnames.ora

    $ echo $TWO_TASK dbo_xyz0123 $ perl -ne'/^$ENV{TWO_TASK}\b/ .. /^$/ and print' $ORACLE_HOME/network +/admin/tns names.ora dbo_xyz0123 = ( DESCRIPTION = ( ADDRESS_LIST = ( ADDRESS = ( HOST = dbo )( PORT = 1521 )( PROTOCOL = TCP ))) ( CONNECT_DATA = ( SERVICE_NAME = xyz0123 ))) $ tnsping $TWO_TASK TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 29-NOV- +2018 14:38:39 Copyright (c) 1997, 2011, Oracle. All rights reserved. Used parameter files: /pro/oracle/v11.2/network/admin/sqlnet.ora Used TNSNAMES adapter to resolve the alias Attempting to contact ( DESCRIPTION = ( ADDRESS_LIST = ( ADDRESS = ( H +OST = dbo)( PORT = 1521)( PROTOCOL = TCP))) ( CONNECT_DATA = ( SERVIC +E_NAME = xyz0123))) OK (620 msec) $

    And then simplify your perl code to

    use DBI; my $dbh = DBI->connect ("dbi:Oracle:", $user, $pass, { RaiseError => 1 +, PrintError => 1});

    If part one fails, part 2 will fail too and doesn't need debugging. If part 1 succeeds, *then* you need to start digging


    Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1226498]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-26 00:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found