Re: How to set LD_LIBRARY_PATH
create shell script, first set enviroment variables Oracle then execute script perl jonathan.leff...@gmail.com escribió: The dynamic loader read LD_LIBRARY_PATH when (before?) Perl gets going. AFAIK, it doesn't reread it, so changing it in Perl code is too late unless you set it and exec your code again (which is basically saying it is too late). I'm tolerably certain this applies to Solaris; I think it applies elsewhere too. JL Sent from my BlackBerry® smartphone, powered by CREDO Mobile. -Original Message- From: newbie01 perl newbie01.p...@gmail.com Date: Fri, 28 May 2010 19:45:14 To: beginnersbeginn...@perl.org; dbi-usersdbi-users@perl.org Subject: How to set LD_LIBRARY_PATH Hi all, Can someone advise how to set LD_LIBRARY_PATH from within the Perl scripts? If I set LD_LIBRARY_PATH from the command line, all is okay [oracle ~]$ perl -e 'use DBD::Oracle; print $DBD::Oracle::VERSION,\n;' Can't load '/oracle/product/db/11.1/perl/lib/site_perl/5.8.3/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.11.1: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/DynaLoader.pm line 230. at -e line 1 Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1. [oracle ~]$ export LD_LIBRARY_PATH=/oracle/product/db/11.1/lib [oracle ~]$ perl -e 'use DBD::Oracle; print $DBD::Oracle::VERSION,\n;' 1.15 But if I do the following instead in the Perl script, it does not work? How to set the LD_LIBRARY_PATH then? $ENV{ORACLE_HOME}=$ORACLE_HOME; $ENV{ORACLE_SID}=$ORACLE_SID; $ENV{PATH}=$ORACLE_HOME/bin:$PATH; $ENV{LD_LIBRARY_PATH}=$ORACLE_HOME/lib; FYI, the script is to run from a cron which is why am setting LD_LIBRARY_PATH in the script. Any response will be very much appreciated. Thanks in advance.
environment variable
how can i export a variable from program perl to shell script through environment variable. Thank you -- Open WebMail Project (http://openwebmail.org)
switching perl version
A perl program executing in linux Redhat 7.0, perl version 5.6, oracle 8i was using 30% cpu approx. Now I'm running the same program in linux enterprise ES 4, perl v. 5.8.5, Oracle 10g. uses 60% cpu. I'd like to know what's happening because the performance is slower and the difference is wide big. Do you think this perl new version (5.8.5) takes more cpu ? I appreciate any idea you could give me to improve my performance. -- Open WebMail Project (http://openwebmail.org)
processor use
I did migration from oracle 8i, linux Redhat 7.0 to oracle 10g linux Enterprise Es. programs Perl were but slow, the question is if I can compile the programs in Perl or give priority to some programs when executing. I think that the problem is processor use. any ideas thanks -- Open WebMail Project (http://openwebmail.org)
RE: (Fwd) dbd-oracle-1.16
Hi Reidy, Thanks The permissions are oracle.oinstall -- Open WebMail Project (http://openwebmail.org) -- Original Message --- From: Reidy, Ron [EMAIL PROTECTED] To: Tim Bunce [EMAIL PROTECTED], dbi-users@perl.org Sent: Thu, 20 Jul 2006 05:16:06 -0600 Subject: RE: (Fwd) dbd-oracle-1.16 Oscar, Is Oracle installed? If so, what the permissions on $ORACLE_HOME/lib and $ORACLE_HOME/libclntsh.so.8.0? -Original Message- From: Tim Bunce [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 11:45 PM To: dbi-users@perl.org Cc: [EMAIL PROTECTED] Subject: (Fwd) dbd-oracle-1.16 - Forwarded message from Oscar Gomez [EMAIL PROTECTED] - X-Pobox-Antispam: require_ptr/ returned deny: 200.13.228.34 has no PTR record, or PTR and A records do not match From: Oscar Gomez [EMAIL PROTECTED] To: Tim Bunce [EMAIL PROTECTED] Subject: dbd-oracle-1.16 Date: Wed, 19 Jul 2006 16:54:32 -0500 X-OriginatingIP: 10.0.1.50 (ogomez) Tim I have the following error when execute program in apache-cgi-oracle [Wed Jul 19 17:08:18 2006] [error] [client 10.0.1.50] install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/Oracle/ Oracle.so' for module DBD::Oracle: libclntsh.so.8.0: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230., referer: http://10.0.0.6/cgi-bin/FGI?py6110 [Wed Jul 19 17:08:18 2006] [error] [client 10.0.1.50] at (eval 1) line 3, referer: http://10.0.0.6/cgi-bin/FGI?py6110 [Wed Jul 19 17:08:18 2006] [error] [client 10.0.1.50] Compilation failed in require at (eval 1) line 3., referer: http://10.0.0.6/cgi-bin/FGI?py6110 [Wed Jul 19 17:08:18 2006] [error] [client 10.0.1.50] Perhaps a required shared library or dll isn't installed where expected, referer: http://10.0.0.6/cgi-bin/FGI?py6110 perl version 5.8.5 lunux enterprise ES 4 DBD-Oracle-1.16 DBI-1.30 Thanks -- Open WebMail Project (http://openwebmail.org) -- Original Message --- From: Tim Bunce [EMAIL PROTECTED] To: Garrett, Philip (MAN-Corporate) [EMAIL PROTECTED] Sent: Wed, 19 Jul 2006 08:37:27 -0700 Subject: Re: DBI-installed_drivers() usage On Wed, Jul 19, 2006 at 09:24:53AM -0400, Garrett, Philip (MAN- Corporate) wrote: Paul Griffin wrote: I'm running Win XP with Perl 5.8.8. If I try and run the following code : use DBI; my %drivers = DBI-installed_drivers(); foreach (keys( %drivers)) { print $_ uses $drivers{$_}\n; } Nothing is returned. Yet if I use : my @drivers = DBI-available_drivers(); I get a list of drivers that I can then access with : @dataSources = DBI-data_sources($_); Am I using DBI-installed_drivers() incorrectly? DBI-installed_drivers returns only the drivers that are actually loaded into the current process. Installed in this case means installed into memory. Ah. The docs weren't clear: --- DBI.pm (revision 6618) +++ DBI.pm (working copy) @@ -2753,10 +2753,15 @@ %drivers = DBI-installed_drivers(); -Returns a list of driver name and driver handle pairs for all -installed drivers. The driver name does not include the 'DBD::' -prefix. Added in DBI 1.49. +Returns a list of driver name and driver handle pairs for all drivers +'installed' (loaded) into the current process. The driver name does not +include the 'DBD::' prefix. +To get a list of all drivers available in your perl instalation you can use +L/available_drivers. + +Added in DBI 1.49. + =item Cinstalled_versions DBI-installed_versions; Tim. --- End of Original Message --- - End forwarded message - This electronic message transmission is a PRIVATE communication which contains information which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. Please notify the sender of the delivery error by replying to this message, or notify us by telephone (877-633-2436, ext. 0), and then delete it from your system. --- End of Original Message ---
RE: (Fwd) dbd-oracle-1.16
Ok, drwxr-xr-x 3 oracle oinstall 4096 Jul 21 10:26 /opt/local/m01/app/oracle/product/8.17/lib/ -rwxr-xr-x 1 oracle oinstall 6352174 Jul 21 10:26 /opt/local/m01/app/oracle/product/8.17/lib/libclntsh.so.8.0 Running the script from the command line connects to the database and returns correct results. -- Open WebMail Project (http://openwebmail.org) -- Original Message --- From: Reidy, Ron [EMAIL PROTECTED] To: Oscar Gomez [EMAIL PROTECTED], dbi-users@perl.org Sent: Fri, 21 Jul 2006 09:49:48 -0600 Subject: RE: (Fwd) dbd-oracle-1.16 Oscar, That information is owner/group id. I am asking about read/execute permissions for this file. It might be the user who is executing the Perl script does not have permissions into the $OH directory tree. -Original Message- From: Oscar Gomez [mailto:[EMAIL PROTECTED] Sent: Friday, July 21, 2006 9:20 AM To: Reidy, Ron; dbi-users@perl.org Subject: RE: (Fwd) dbd-oracle-1.16 Hi Reidy, Thanks The permissions are oracle.oinstall -- Open WebMail Project (http://openwebmail.org) -- Original Message --- From: Reidy, Ron [EMAIL PROTECTED] To: Tim Bunce [EMAIL PROTECTED], dbi-users@perl.org Sent: Thu, 20 Jul 2006 05:16:06 -0600 Subject: RE: (Fwd) dbd-oracle-1.16 Oscar, Is Oracle installed? If so, what the permissions on $ORACLE_HOME/lib and $ORACLE_HOME/libclntsh.so.8.0? -Original Message- From: Tim Bunce [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 11:45 PM To: dbi-users@perl.org Cc: [EMAIL PROTECTED] Subject: (Fwd) dbd-oracle-1.16 - Forwarded message from Oscar Gomez [EMAIL PROTECTED] - X-Pobox-Antispam: require_ptr/ returned deny: 200.13.228.34 has no PTR record, or PTR and A records do not match From: Oscar Gomez [EMAIL PROTECTED] To: Tim Bunce [EMAIL PROTECTED] Subject: dbd-oracle-1.16 Date: Wed, 19 Jul 2006 16:54:32 -0500 X-OriginatingIP: 10.0.1.50 (ogomez) Tim I have the following error when execute program in apache-cgi-oracle [Wed Jul 19 17:08:18 2006] [error] [client 10.0.1.50] install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/Oracle/ Oracle.so' for module DBD::Oracle: libclntsh.so.8.0: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230., referer: http://10.0.0.6/cgi-bin/FGI?py6110 [Wed Jul 19 17:08:18 2006] [error] [client 10.0.1.50] at (eval 1) line 3, referer: http://10.0.0.6/cgi-bin/FGI?py6110 [Wed Jul 19 17:08:18 2006] [error] [client 10.0.1.50] Compilation failed in require at (eval 1) line 3., referer: http://10.0.0.6/cgi-bin/FGI?py6110 [Wed Jul 19 17:08:18 2006] [error] [client 10.0.1.50] Perhaps a required shared library or dll isn't installed where expected, referer: http://10.0.0.6/cgi-bin/FGI?py6110 perl version 5.8.5 lunux enterprise ES 4 DBD-Oracle-1.16 DBI-1.30 Thanks -- Open WebMail Project (http://openwebmail.org) -- Original Message --- From: Tim Bunce [EMAIL PROTECTED] To: Garrett, Philip (MAN-Corporate) [EMAIL PROTECTED] Sent: Wed, 19 Jul 2006 08:37:27 -0700 Subject: Re: DBI-installed_drivers() usage On Wed, Jul 19, 2006 at 09:24:53AM -0400, Garrett, Philip (MAN- Corporate) wrote: Paul Griffin wrote: I'm running Win XP with Perl 5.8.8. If I try and run the following code : use DBI; my %drivers = DBI-installed_drivers(); foreach (keys( %drivers)) { print $_ uses $drivers{$_}\n; } Nothing is returned. Yet if I use : my @drivers = DBI-available_drivers(); I get a list of drivers that I can then access with : @dataSources = DBI-data_sources($_); Am I using DBI-installed_drivers() incorrectly? DBI-installed_drivers returns only the drivers that are actually loaded into the current process. Installed in this case means installed into memory. Ah. The docs weren't clear: --- DBI.pm (revision 6618) +++ DBI.pm (working copy) @@ -2753,10 +2753,15 @@ %drivers = DBI-installed_drivers(); -Returns a list of driver name and driver handle pairs for all -installed drivers. The driver name does not include the 'DBD::' -prefix. Added in DBI 1.49. +Returns a list of driver name and driver handle pairs for all drivers +'installed' (loaded) into the current process. The driver name does not +include the 'DBD::' prefix. +To get a list of all drivers available in your perl instalation you can use +L/available_drivers. + +Added in DBI 1.49. + =item Cinstalled_versions DBI-installed_versions; Tim. --- End of Original Message --- - End forwarded message - This electronic message transmission is a PRIVATE communication
RE: (Fwd) dbd-oracle-1.16
Hi, Reidy I put the following environment variables in the configuration file httpd.conf: SetEnv LD_LIBRARY_PATH /opt/local/m01/app/oracle/product/8.17/lib SetEnv ORACLE_HOME /opt/local/m01/app/oracle/product/8.17/ SetEnv ORACLE_SID epqdb SetEnv LD_RUN_PATH /opt/local/m01/app/oracle/product/8.17/rdbms/lib and the problem disappear many thanks for you help -- Open WebMail Project (http://openwebmail.org) -- Original Message --- From: Reidy, Ron [EMAIL PROTECTED] To: Oscar Gomez [EMAIL PROTECTED] Sent: Fri, 21 Jul 2006 10:56:58 -0600 Subject: RE: (Fwd) dbd-oracle-1.16 I am not a web programmer, so I cannot address this. I seem to recall the preferred place to set these vars is httpd.conf. I do not know the vars PassEnv and PerlPassEnv, sorry. -Original Message- From: Oscar Gomez [mailto:[EMAIL PROTECTED] Sent: Friday, July 21, 2006 10:33 AM To: Reidy, Ron Subject: RE: (Fwd) dbd-oracle-1.16 Reidy in google say : ORACLE_HOME, LD_LIBRARY_PATH ($ORACLE_HOME/lib), TWO_TASK, and LD_RUN_PATH($ORACLE_HOME/lib:$ORACLE_HOME/rdbms/lib) set in httpd.conf Have you added PassEnv and PerlPassEnv directives for all of these variables? I have this enviroment variables in the script xxx.pl. is the same ? thanks -- Open WebMail Project (http://openwebmail.org) -- Original Message --- From: Reidy, Ron [EMAIL PROTECTED] To: Oscar Gomez [EMAIL PROTECTED] Sent: Fri, 21 Jul 2006 10:34:40 -0600 Subject: RE: (Fwd) dbd-oracle-1.16 Operating System -Original Message- From: Oscar Gomez [mailto:[EMAIL PROTECTED] Sent: Friday, July 21, 2006 10:03 AM To: Reidy, Ron Subject: RE: (Fwd) dbd-oracle-1.16 excuse me,what is O/S thanks -- Open WebMail Project (http://openwebmail.org) -- Original Message --- From: Reidy, Ron [EMAIL PROTECTED] To: Oscar Gomez [EMAIL PROTECTED], dbi-users@perl.org Sent: Fri, 21 Jul 2006 10:12:46 -0600 Subject: RE: (Fwd) dbd-oracle-1.16 So, the O/S user running the web server cannot execute this? I think this has been answered before and is available via google. I don't remember the answer off the top of my head. -Original Message- From: Oscar Gomez [mailto:[EMAIL PROTECTED] Sent: Friday, July 21, 2006 9:46 AM To: Reidy, Ron; dbi-users@perl.org Subject: RE: (Fwd) dbd-oracle-1.16 Ok, drwxr-xr-x 3 oracle oinstall 4096 Jul 21 10:26 /opt/local/m01/app/oracle/product/8.17/lib/ -rwxr-xr-x 1 oracle oinstall 6352174 Jul 21 10:26 /opt/local/m01/app/oracle/product/8.17/lib/libclntsh.so.8.0 Running the script from the command line connects to the database and returns correct results. -- Open WebMail Project (http://openwebmail.org) -- Original Message --- From: Reidy, Ron [EMAIL PROTECTED] To: Oscar Gomez [EMAIL PROTECTED], dbi-users@perl.org Sent: Fri, 21 Jul 2006 09:49:48 -0600 Subject: RE: (Fwd) dbd-oracle-1.16 Oscar, That information is owner/group id. I am asking about read/execute permissions for this file. It might be the user who is executing the Perl script does not have permissions into the $OH directory tree. -Original Message- From: Oscar Gomez [mailto:[EMAIL PROTECTED] Sent: Friday, July 21, 2006 9:20 AM To: Reidy, Ron; dbi-users@perl.org Subject: RE: (Fwd) dbd-oracle-1.16 Hi Reidy, Thanks The permissions are oracle.oinstall -- Open WebMail Project (http://openwebmail.org) -- Original Message --- From: Reidy, Ron [EMAIL PROTECTED] To: Tim Bunce [EMAIL PROTECTED], dbi-users@perl.org Sent: Thu, 20 Jul 2006 05:16:06 -0600 Subject: RE: (Fwd) dbd-oracle-1.16 Oscar, Is Oracle installed? If so, what the permissions on $ORACLE_HOME/lib and $ORACLE_HOME/libclntsh.so.8.0? -Original Message- From: Tim Bunce [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 11:45 PM To: dbi-users@perl.org Cc: [EMAIL PROTECTED] Subject: (Fwd) dbd-oracle-1.16 - Forwarded message from Oscar Gomez [EMAIL PROTECTED] - X-Pobox-Antispam: require_ptr/ returned deny: 200.13.228.34 has no PTR record, or PTR and A records do not match From: Oscar Gomez [EMAIL PROTECTED] To: Tim Bunce [EMAIL PROTECTED] Subject: dbd-oracle-1.16 Date: Wed, 19 Jul 2006 16:54:32 -0500 X-OriginatingIP: 10.0.1.50 (ogomez) Tim I have the following error when execute program in apache-cgi-oracle [Wed Jul 19 17:08:18 2006] [error] [client 10.0.1.50] install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/Oracle/ Oracle.so' for module DBD::Oracle: libclntsh.so.8.0: cannot open shared object file
Re: problem DBD-Oracle-1.17 linux enterprise AS
the solution is to duplicate one of the fields of select. it is problem of the module?. for example: select itmpar, texpar, texpar from par where ciapar = :p1 and fampar = :p2 ' -- Open WebMail Project (http://openwebmail.org) -- Original Message --- From: Kevin Moore [EMAIL PROTECTED] To: Oscar Gomez [EMAIL PROTECTED] Sent: Tue, 11 Apr 2006 20:11:44 -0700 Subject: Re: problem DBD-Oracle-1.17 linux enterprise AS Oscar, Are there errors in your alert log? The ora-600 is a generic message. It's quite possible oracle generated a trace file that may also help. Kevin Oscar Gomez wrote: i have this error when i made interface program perl with oracle 10g trough DBD module. DBD::Oracle::st execute failed: ORA-00600: internal error code, arguments: [kpofdr-long], [], [], [], [], [], [], [] (DBD ERROR: error possibly near * indicator at char 37 in 'select itmpar, texpar from useru.*par where ciapar = :p1 and fampar = :p2 ') [for Statement select itmpar, texpar from useru.par where ciapar = ? and fampar = ? with ParamValues: :p1=0, :p2='py-ley'] at ./1230.pl line 28. but,if I execute it for the second time it work ok. thanks -- Open WebMail Project (http://openwebmail.org) --- End of Forwarded Message --- -- Open WebMail Project (http://openwebmail.org) --- End of Original Message ---
problem DBD-Oracle-1.17 linux enterprise AS
i have this error when i made interface program perl with oracle 10g trough DBD module. DBD::Oracle::st execute failed: ORA-00600: internal error code, arguments: [kpofdr-long], [], [], [], [], [], [], [] (DBD ERROR: error possibly near * indicator at char 37 in 'select itmpar, texpar from useru.*par where ciapar = :p1 and fampar = :p2 ') [for Statement select itmpar, texpar from useru.par where ciapar = ? and fampar = ? with ParamValues: :p1=0, :p2='py-ley'] at ./1230.pl line 28. but,if I execute it for the second time it work ok. thanks -- Open WebMail Project (http://openwebmail.org) --- End of Forwarded Message --- -- Open WebMail Project (http://openwebmail.org)
Fw: Re: problem DBD-Oracle-1.17 linux enterprise AS
the versions DBI y DBD are: DBD::Oracle -- 1.16, DBI -- 1.50 I was working in oracle 8i with modules DBD::Oracle -- 1.12 DBI -- 1.30 without problems. connect : sub _connect { my $wdsn = dbi:Oracle:orcl; $ENV { ORACLE_HOME } = /ora8/soft/oracle/product/10.1.0/db_1/; $ENV { ORACLE_SID } = epqdb; $dbh = DBI-connect ( $wdsn, 'user', 'pw') or error ( BATCH, txt = connect ); $dbh-{ AutoCommit} = 0; } prepare : $sth_par = $dbh-prepare ( select itmpar, texpar from useru.par where ciapar = ? and fampar = ? ) or $batch-error (txt = p720); execute : $sth_par-bind_param ( 1, 0 ); $sth_par-bind_param ( 2, 'py-ley', DBI::SQL_CHAR ); $sth_par-execute or print p110 $dbh-errstr; thanks -- Forwarded Message --- From: John Scoles [EMAIL PROTECTED] To: dbi-users@perl.org Sent: Wed, 10 May 2006 09:25:02 -0500 Subject: Re: problem DBD-Oracle-1.17 linux enterprise AS If you could include which version of DBI, DBD:Oracle and some of your original perl code it would give us a better idea on how to debug this. So far a ORA-00600 error can be any one of a number of problems. One is a 'time out error' which might explain why it runs the second time. cheers John Scoles Oscar Gomez [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i have this error when i made interface program perl with oracle 10g trough DBD module. DBD::Oracle::st execute failed: ORA-00600: internal error code, arguments: [kpofdr-long], [], [], [], [], [], [], [] (DBD ERROR: error possibly near * indicator at char 37 in 'select itmpar, texpar from useru.*par where ciapar = :p1 and fampar = :p2 ') [for Statement select itmpar, texpar from useru.par where ciapar = ? and fampar = ? with ParamValues: :p1=0, :p2='py-ley'] at ./1230.pl line 28. but,if I execute it for the second time it work ok. thanks -- Open WebMail Project (http://openwebmail.org) --- End of Forwarded Message --- -- Open WebMail Project (http://openwebmail.org) --- End of Forwarded Message --- -- Open WebMail Project (http://openwebmail.org)
Re: (Fwd) perl future
all the applications of my company work with apache Perl oracle,I want to know as it is the future of the Perl in the world and if we go by the correct way, because the directors of the company think that no. as it is its use in the world. Thanks