.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DBD::Oracle::Troubleshooting 3pm" .TH DBD::Oracle::Troubleshooting 3pm 2024-01-13 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME DBD::Oracle::Troubleshooting \- Tips and Hints to Troubleshoot DBD::Oracle .SH VERSION .IX Header "VERSION" version 1.83 .SH "CONNECTING TO ORACLE" .IX Header "CONNECTING TO ORACLE" If you are reading this it is assumed that you have successfully installed DBD::Oracle and you are having some problems connecting to Oracle. .PP First off you will have to tell DBD::Oracle where the binaries reside for the Oracle client it was compiled against. This is the case when you encounter a .PP .Vb 1 \& DBI connect(\*(Aq\*(Aq,\*(Aqsystem\*(Aq,...) failed: ERROR OCIEnvNlsCreate. .Ve .PP error in Linux or in Windows when you get .PP .Vb 1 \& OCI.DLL not found .Ve .PP The solution to this problem in the case of Linux is to ensure your \&'ORACLE_HOME' (or LD_LIBRARY_PATH for InstantClient) environment variable points to the correct directory. .PP .Vb 1 \& export ORACLE_HOME=/app/oracle/product/xx.x.x .Ve .PP For Windows the solution is to add this value to you PATH .PP .Vb 1 \& PATH=c:\eapp\eoracle\eproduct\exx.x.x;%PATH% .Ve .PP If you get past this stage and get a .PP .Vb 1 \& ORA\-12154: TNS:could not resolve the connect identifier specified .Ve .PP error then the most likely cause is DBD::ORACLE cannot find your .ORA (\fITNSNAMES.ORA\fR, \fILISTENER.ORA\fR, \fISQLNET.ORA\fR) files. This can be solved by setting the TNS_ADMIN environment variable to the directory where these files can be found. .PP If you get to this stage and you have either one of the following errors; .PP .Vb 2 \& ORA\-12560: TNS:protocol adapter error \& ORA\-12162: TNS:net service name is incorrectly specified .Ve .PP usually means that DBD::Oracle can find the listener but the it cannot connect to the DB because the listener cannot find the DB you asked for. .SS "Oracle utilities" .IX Subsection "Oracle utilities" If you are still having problems connecting then the Oracle adapters utility may offer some help. Run these two commands: .PP .Vb 2 \& $ORACLE_HOME/bin/adapters \& $ORACLE_HOME/bin/adapters $ORACLE_HOME/bin/sqlplus .Ve .PP and check the output. The "Protocol Adapters" should include at least "IPC Protocol Adapter" and "TCP/IP Protocol Adapter". .PP If it generates any errors which look relevant then please talk to your Oracle technical support (and not the dbi-users mailing list). .SS "Connecting using a bequeather" .IX Subsection "Connecting using a bequeather" If you are using a bequeather to connect to a server on the same host as the client, you might have to add .PP .Vb 1 \& bequeath_detach = yes .Ve .PP to your sqlnet.ora file or you won't be able to safely use fork/system functions in Perl. .PP See the discussion at and for more gory details. .SH "USING THE LONG TYPES" .IX Header "USING THE LONG TYPES" Some examples related to the use of LONG types are available in the \f(CW\*(C`examples/\*(C'\fR directory of the distribution. .SH "Can't find \fIlibclntsh.so\fP" .IX Header "Can't find libclntsh.so" \&\fIlibclntsh.so\fR is the shared library composed of all the other Oracle libs you used to have to statically link. libclntsh.so should be in \fR\f(CI$ORACLE_HOME\fR\fI/lib\fR. If it's missing, try running \fI\fR\f(CI$ORACLE_HOME\fR\fI/lib/genclntsh.sh\fR and it should create it. .PP Never copy \fIlibclntsh.so\fR to a different machine or Oracle version. If DBD::Oracle was built on a machine with a different path to \fIlibclntsh.so\fR then you'll need to set an environment variable, typically \&\fILD_LIBRARY_PATH\fR, to include the directory containing \fIlibclntsh.so\fR. .PP \&\fILD_LIBRARY_PATH\fR is typically ignored if the script is running set-uid (which is common in some httpd/CGI configurations). In this case either rebuild with \fILD_RUN_PATH\fR set to include the path to \fIlibclntsh\fR or create a symbolic link so that \fIlibclntsh\fR is available via the same path as it was when the module was built. (On Solaris the command "ldd \-s Oracle.so" can be used to see how the linker is searching for it.) .SH Miscellaneous .IX Header "Miscellaneous" .SS "Crash with an open connection and Module::Runtime in mod_perl2" .IX Subsection "Crash with an open connection and Module::Runtime in mod_perl2" See RT 72989 (https://rt.cpan.org/Ticket/Display.html?id=72989) .PP Apache2 MPM Prefork with mod_perl2 will crash if Module::Runtime is loaded, and an Oracle connection is opened through PerlRequire (before forking). .PP It looks like this was fixed in 0.012 of Module::Runtime. .SS "bind_param_inout swapping return values" .IX Subsection "bind_param_inout swapping return values" See RT 71819 (https://rt.cpan.org/Ticket/Display.html?id=71819) .PP It seems that in some older versions of Oracle Instant Client (certainly 10.2.0.4.0) when output parameters are bound with lengths greater than 3584 the output parameters can be returned in the wrong placeholders. .PP It is reported fixed in Instant Client 11.2.0.2.0. .SH AUTHORS .IX Header "AUTHORS" .IP \(bu 4 Tim Bunce .IP \(bu 4 John Scoles .IP \(bu 4 Yanick Champoux .IP \(bu 4 Martin J. Evans .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2022, 2021, 2019, 2014, 2013, 2012, 2011, 2010 by Tim Bunce. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.