.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 "2019-01-06" "perl v5.28.1" "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.76 .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 \&'\s-1ORACLE_HOME\s0' (or \s-1LD_LIBRARY_PATH\s0 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 \s-1PATH\s0 .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 \s-1DBD::ORACLE\s0 cannot find your .ORA (\fI\s-1TNSNAMES.ORA\s0\fR, \fI\s-1LISTENER.ORA\s0\fR, \fI\s-1SQLNET.ORA\s0\fR) files. This can be solved by setting the \s-1TNS_ADMIN\s0 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 \s-1DB\s0 because the listener cannot find the \s-1DB\s0 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 \*(L"Protocol Adapters\*(R" should include at least \*(L"\s-1IPC\s0 Protocol Adapter\*(R" and \*(L"\s-1TCP/IP\s0 Protocol Adapter\*(R". .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 \s-1LONG\s0 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 \fI\f(CI$ORACLE_HOME\fI/lib\fR. If it's missing, try running \fI\f(CI$ORACLE_HOME\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 \&\fI\s-1LD_LIBRARY_PATH\s0\fR, to include the directory containing \fIlibclntsh.so\fR. .PP \&\fI\s-1LD_LIBRARY_PATH\s0\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 \fI\s-1LD_RUN_PATH\s0\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 \&\*(L"ldd \-s Oracle.so\*(R" 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 \s-1RT 72989\s0 (https://rt.cpan.org/Ticket/Display.html?id=72989) .PP Apache2 \s-1MPM\s0 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 \s-1RT 71819\s0 (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) 2018, 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.