#PODNAME: DBD::Oracle::Troubleshooting #ABSTRACT: Tips and Hints to Troubleshoot DBD::Oracle __END__ =pod =encoding UTF-8 =head1 NAME DBD::Oracle::Troubleshooting - Tips and Hints to Troubleshoot DBD::Oracle =head1 VERSION version 1.74 =head1 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. 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 DBI connect('','system',...) failed: ERROR OCIEnvNlsCreate. error in Linux or in Windows when you get OCI.DLL not found 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. export ORACLE_HOME=/app/oracle/product/xx.x.x For Windows the solution is to add this value to you PATH PATH=c:\app\oracle\product\xx.x.x;%PATH% If you get past this stage and get a ORA-12154: TNS:could not resolve the connect identifier specified error then the most likely cause is DBD::ORACLE cannot find your .ORA (F, F, F) files. This can be solved by setting the TNS_ADMIN environment variable to the directory where these files can be found. If you get to this stage and you have either one of the following errors; ORA-12560: TNS:protocol adapter error ORA-12162: TNS:net service name is incorrectly specified 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. =head2 Oracle utilities If you are still having problems connecting then the Oracle adapters utility may offer some help. Run these two commands: $ORACLE_HOME/bin/adapters $ORACLE_HOME/bin/adapters $ORACLE_HOME/bin/sqlplus and check the output. The "Protocol Adapters" should include at least "IPC Protocol Adapter" and "TCP/IP Protocol Adapter". If it generates any errors which look relevant then please talk to your Oracle technical support (and not the dbi-users mailing list). =head2 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 bequeath_detach = yes to your sqlnet.ora file or you won't be able to safely use fork/system functions in Perl. See the discussion at L and L for more gory details. =head1 USING THE LONG TYPES Some examples related to the use of LONG types are available in the C directory of the distribution. =head1 Can't find I I is the shared library composed of all the other Oracle libs you used to have to statically link. libclntsh.so should be in I<$ORACLE_HOME/lib>. If it's missing, try running I<$ORACLE_HOME/lib/genclntsh.sh> and it should create it. Never copy I to a different machine or Oracle version. If DBD::Oracle was built on a machine with a different path to I then you'll need to set an environment variable, typically I, to include the directory containing I. I is typically ignored if the script is running set-uid (which is common in some httpd/CGI configurations). In this case either rebuild with I set to include the path to I or create a symbolic link so that I 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.) =head1 Miscellaneous =head2 Crash with an open connection and Module::Runtime in mod_perl2 See RT 72989 (https://rt.cpan.org/Ticket/Display.html?id=72989) Apache2 MPM Prefork with mod_perl2 will crash if Module::Runtime is loaded, and an Oracle connection is opened through PerlRequire (before forking). It looks like this was fixed in 0.012 of Module::Runtime. =head2 bin_param_inout swapping return values See RT 71819 (https://rt.cpan.org/Ticket/Display.html?id=71819) 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. It is reported fixed in Instant Client 11.2.0.2.0. =head1 AUTHORS =over 4 =item * Tim Bunce =item * John Scoles =item * Yanick Champoux =item * Martin J. Evans =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 1994 by Tim Bunce. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut