hi ppl, Im very new to Perl and Unix. I have a script which is not working in Production environment. Same script for the same is provided below ## Start of Script
my $ORACLE_HOME = "/opt/oracle/app/oracle/product/10g"; my $ORACLE_SID1="DBHOSTNAME"; my $TGT_USER="USER1"; my $TGT_PASS="PASSWORD"; $ENV{ORACLE_HOME}=$ORACLE_HOME; $ENV{PATH}="$ORACLE_HOME/bin:/usr/sbin"; #$ENV{LD_LIBRARY_PATH}="$ORACLE_HOME/lib32"; #$ENV{CLASSPATH}="$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbm +s/jlib"; BEGIN { die "ORACLE_HOME not set\n" unless $ENV{ORACLE_HOME}; unless ($ENV{OrAcLePeRl}) { $ENV{OrAcLePeRl} = "$ENV{ORACLE_HOME}/perl"; $ENV{PERL5LIB} = "$ENV{PERL5LIB}:$ENV{OrAcLePeRl}/lib:$ENV{OrAc +LePeRl}/lib/site_perl"; $ENV{LD_LIBRARY_PATH} = "$ENV{ORACLE_HOME}/lib32"; exec "$ENV{OrAcLePeRl}/bin/perl", $0, @ARGV; } } use strict; use warnings; use DBI; my $sql; my $sth; my $sql_ins; my $sql_del; my $sql_upd; my $sql_com; my $sth_ins; my $sth_del; my $sth_upd; my $sth_com; my $dbh_src; my $dbh_tgt; my $count_of_rev; #---------------------------------------- common initialization block +- end ----------------------# print "Variable initialization block executed\n"; #---------------------------------------- Get Account id - Start ----- +-----------------# my $sh_name=$ARGV[0]; my @acc_row; $ENV{ORACLE_SID}=$ORACLE_SID1; $dbh_tgt = DBI->connect("dbi:Oracle:$ENV{ORACLE_SID}", $TGT_USER, $TGT +_PASS) or die; print "Connection Successfull\n"; $dbh_tgt->disconnect;
## End of Script When i run the above script i get the following error. Can't load '/opt/oracle/app/oracle/product/10g/perl/lib/site_perl/5.8.3/i686-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file: No such file or directory at /opt/oracle/app/oracle/product/10g/perl/lib/5.8.3/i686-linux-thread-multi/DynaLoader.pm line 229. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expected at sample_test.pl line 45 Can anyone guide me through what might be potential problem causing this issue. Im kind of struck with this for couple of days and deadline is approaching. Thanks in advance for your replies. Hi, I have updated the thread. Sorry for the inconvenience cause and adding a few more details to the thread , the connectivity thing used in the code, i got it as a plug in from one of the sites  http://www.orafaq.com/wiki/Perl When i made use of the following line in plugin
$ENV{LD_LIBRARY_PATH} = "$ENV{LD_LIBRARY_PATH}:$ENV{ORACLE_HOME}/lib3 +2:$ENV{ORACLE_HOME}/lib";
was causing me the following issue,  wrong ELF class: ELFCLASS64 so i had to change he code   $ENV{LD_LIBRARY_PATH} = "$ENV{ORACLE_HOME}/lib32"; As per suggestion given in one of the sites
export LD_LIBRARY_PATH=$ORACLE_HOME/lib Update: If you get an ELFCLASS64 error, try setting LD_LIBRARY_PATH to + $ORACLE_HOME/lib32 instead.
But still the other two erorrs are persisting...

In reply to Perl - Oracle Connectivity by arvind_hotdog

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.