Dbd Error Ociserverattach Perl
Contents |
Annotate this POD Website CPAN RT New 4 Open 14 Stalled 1 View/Report Bugs Module Version: 1.39_00 Source LatestRelease:DBD-Oracle-1.46 NAME VERSION CONNECTING TO ORACLE Oracle utilities Connecting using a bequeather USING THE LONG TYPES LINUX Installing
Perl Dbi Oracle Service Name
with Instantclient .rpm files. undefined symbol: __cmpdi2 comes up when Oracle isn't properly linked perl dbi oracle connect example to the libgcc.a library. cc1: invalid option `tune=pentium4'" error Oracle 9i Lite Oracle 10g Instantclient Oracle Database 10g Express Edition perl oracle connection 10.2 UTF8 bug in Oracle 9.2.0.5.0 and 9.2.0.7.0 CYGWIN Compiling DBD::Oracle using the Oracle Instant Client, Cygwin Perl and gcc SUN VMS AUTHORS COPYRIGHT AND LICENSE NAME DBD::Oracle::Troubleshooting - Tips and Hints to
Dbd Oracle
Troubleshoot DBD::Oracle VERSION version 1.39_00 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
Perl Dbi Example
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 (TNSNAMES.ORA, LISTENER.ORA, SQLNET.ORA) 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. 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
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow oracle sid the company Business Learn more about hiring developers or posting ads with us Stack Overflow
Ora-12154: Tns:could Not Resolve The Connect Identifier Specified
Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error ORA-12154 on DBI->connect to Oracle database with Oracle Instant Client in Solaris 10 up vote 0 down vote http://search.cpan.org/~pythian/DBD-Oracle-1.39_00/lib/DBD/Oracle/Troubleshooting.pm favorite I've been pulling my hair out over this problem for two days now: I'm trying to get a perl script to interface with an Oracle database. I have a new server I'd like to deploy my application on. This script previously worked. Here's what I've done so far: Placed my tnsnames.ora file in instantclient/network/admin: ls -la network/admin/ total 8 drwxrwxrwx 2 m staff 512 Apr 19 09:54 . drwxrwxrwx 3 m http://stackoverflow.com/questions/16114916/error-ora-12154-on-dbi-connect-to-oracle-database-with-oracle-instant-client-in staff 512 Mar 28 15:56 .. -rwxrwxrwx 1 m staff 777 Apr 19 09:54 tnsnames.ora My Perl script looks like this: 12 use CGI; 13 use DBI; 14 use Data::Dumper; 15 use strict; 16 28 $ENV{ORACLE_HOME} = "/xxx/instantclient/"; 29 32 $ENV{'LD_LIBRARY_PATH'} = "xxx/instantclient/lib"; 33 35 use DBD::Oracle; 36 37 print "DBI::VERSION: $DBI::VERSION\n"; 38 print "$DBD::Oracle::VERSION\n"; 66 my $dbh = DBI->connect("dbi:Oracle:host=computer;port=1521;sid=mydatabase", "user", "pass"); 67 my $sth = $dbh->prepare("SELECT sysdate FROM dual"); 68 my $rv = $sth->execute; 69 DBI::dump_results($sth) if $rv; 70 $dbh->disconnect; 71 72 print "$database $dbUser $dbPassword \n"; 73 74 my $dbh = DBI->connect( $database, $dbUser, $dbPassword ) or die("PROBLEM WITH LINE:\n$! , stopped"); This script produces this output: DBI::VERSION: 1.609 DBD::Oracle version: 1.24 '19-APR-13' 1 rows dbi:Oracle:mydatabase user pass DBI connect('mydatabase','user',...) failed: ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach) at ./code.pl line 74 My tnsnames.ora file contains the following entry: mydatabase = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = computer )(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = service.computer.com) ) ) This tnsnames.ora file has been copied from a working machine, so I'm confident it works. The strange thing is, I can connect to the code without using the tnsnames.ora file, but when I try to use it, it breaks. Any suggestions? perl oracle11g dbi solaris-10 tnsnames share|improve this question
CommunityOracle User Group CommunityTopliners CommunityOTN Speaker BureauJava CommunityError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. https://community.oracle.com/thread/2399445 Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type your message and try again. More discussions in Instant Client All PlacesOracle CommunityArchived ForumsOracle Database Archived ForumsInstant Client This discussion is archived 2 Replies Latest reply on Jun perl dbi 5, 2012 9:47 AM by 941419 DBD::Oracle & Instant client - don't find tnsnames.ora 941419 Jun 4, 2012 9:23 AM Hello, I'm trying to use tns names in Perl scripts to connect with Instant client. I always get the ORA-12154 error when connecting with Perl : ORA-12154: TNS:could not resolve the perl dbi oracle connect identifier specified (DBD ERROR: OCIServerAttach). The perl command that raise the error is : +$dbh = DBI->connect("dbi:Oracle:MYDB","user","password") or die $DBI::errstr."\n";+ I checked my Oracle installation and everything seems fine. Connection with sqlplus work without problem using the same connection string (sqlplus user/passowrd@MYDB). I stat'ed my tnsnames.ora file to check if it's accessed : it is with sqlplus, but not with my perl script. Instant Client has been installed with the zip files made available by Oracle (not RPM). ORACLE_HOME points to the installation directory and tnsnames.ora is located in $ORACLE_HOME//network/admin/. Server is a Red Hat Entreprise 5. In my knowledge DBD::Oracle use OCI so there should not have difference between sqlplus and DBD::Oracle. Am I wrong ? Anyone have had this problem before ? Thanks for your help Florent I have the same question Show 0 Likes(0) 2581Views Tags: none (add) instantclientContent tagged with instantclient, perlContent tagged