Oracle Dbd Error Ociserverattach
Contents |
Q&A Tutorials Poetry RecentThreads NewestNodes Donate What'sNew on Apr 13, 2006 at 16:16UTC ( #543134=perlquestion: print w/replies, xml ) Need Help?? Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following ora 12505 dbd error ociserverattach question: I am having problems connecting to Oracle databases using Perl. I
Failed To Connect To Database Instance: Ora-12541: Tns:no Listener (dbd Error: Ociserverattach).
am able to connect to these databases using Benthic Golden32(third party software) and SQLPlus. Im using activestate dbd error ociserverattach ora 12154 perl 5.6, DBD-Oracle 1.16, DBI 1.48. I never had this problem before using the same scripts. I just got a new computer at work, dualcore Xeons and now
Ora-12154: Tns:could Not Resolve The Connect Identifier Specified
I cant connect after re-installing everything. Here is the error: failed: ORA-12154: TNS:could not resolve the connect identifier specif +ied (DBD ERROR: OCIServerAttach) on line 70. Heres the code for my script: line 70 is the line that starts with my $dbp = DBI->.... print "Setting Database Connection to CDW-P.....\n"; # setting up database connection to CDW-P my $dbp = DBI->connect( 'dbi:Oracle:CDWP02' , "$user1" , "$passw") || die "Database connection not made: $DBI::errstr"; # Queries $Total_Free = "select SUM(BYTES/(1024*1024*1024)) as FREE_GB\n". "from dba_free_space WHERE TABLESPACE_NAME = 'USERSAUTO'"; $Total_V_Used = "select SUM(bytes/(1024*1024*1024)) as USE_GB\n". "from dba_segments WHERE TABLESPACE_NAME = 'USERSAUTO'\n"; $Used_by_ID = "select owner, SUM(bytes/(1024*1024*1024)) as TOTAL_GB\n +". "from dba_segments WHERE TABLESPACE_NAME = 'USERSAUTO'\n". "group by owner\n". "order by TOTAL_GB desc"; # Run Used Space Query print "Getting Used Space.\n"; ### Prepare a SQL statement for execution $CDWP_space_used = $dbp->prepare( "$Total_V_Used"); ### Execute the statement in the database $CDWP_space_used->execute; while ( $row = $CDWP_space_used->fetchrow_array( ) ) { $GC_space_used = $row; } print "$GC_space_used , Total CDW-P space\n"; [download] Let me know if you need more information or the whole code for the script. Thanks in advance to all u perl gurus....2006-04-14 Retitled by planetscape, as per Monastery guidelines Original title: 'DBD error Ora-12154'Comment on (OT) DBD error Ora-12154Download Code Replies are listed 'Best First'. Re: (OT) DBD error Ora-12154 by Codon (Friar) on Apr 13, 2006 at 17:50UTC T
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 the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Regarding perl dbd oracle up vote 1 down vote favorite I have http://www.perlmonks.org/?node_id=543134 two queries When i run the below perl script i am getting the below error Unable to connect: ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach) I can't modify the tnsnames.ora as i dont have access. I know tnsnames.ora doesn't have a entry for testdb database. Is there a workaround. Thought i am accessing the database in the remote solaris machine with the IP Address so http://stackoverflow.com/questions/14208937/regarding-perl-dbd-oracle no need of a entry in the local solaris machine tnsnames.ora. $platform = "Oracle"; $database = "testdb"; $host = "testdb.dev.test.com.au"; $port = "2000"; $user = "scott"; $pw = "tiger"; $dsn = "dbi:$platform:$database:$host:3306"; print "$dsn" . "\n"; # PERL DBI CONNECT (RENAMED HANDLE) my $dbstore = DBI->connect($dsn, $user, $pw) or die "Unable to connect: $DBI::errstr\n"; 2 My understanding about DBD module is even oracle is not installed in the local machine DBD module should work. But i noticed while installation it uses oracle client libraries. So if i install a DBD::Sybase do i need to have a installation of sysbase in local machine. Since I am accessing remote server database thought why local installation of oracle/sybase libraries are required? perl share|improve this question edited Jan 8 '13 at 5:54 Chankey Pathak 11.5k73881 asked Jan 8 '13 at 5:48 Arav 98694182 can any one help me out for the second query? –Arav Jan 9 '13 at 3:09 Please check my comment in my answer for your second question. –slayedbylucifer Jan 9 '13 at 7:05 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted your dsn syntax is wrong. try to make it look like below: $dsn = "dbi:$platform:host=$host;sid=$si
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 http://search.cpan.org/~pythian/DBD-Oracle-1.39_00/lib/DBD/Oracle/Troubleshooting.pm utilities Connecting using a bequeather USING THE LONG TYPES LINUX Installing with http://www.orafaq.com/forum/t/89162/107034/ Instantclient .rpm files. undefined symbol: __cmpdi2 comes up when Oracle isn't properly linked to the libgcc.a library. cc1: invalid option `tune=pentium4'" error Oracle 9i Lite Oracle 10g Instantclient Oracle Database 10g Express Edition 10.2 UTF8 bug in Oracle 9.2.0.5.0 and 9.2.0.7.0 CYGWIN Compiling DBD::Oracle using dbd error the Oracle Instant Client, Cygwin Perl and gcc SUN VMS AUTHORS COPYRIGHT AND LICENSE NAME DBD::Oracle::Troubleshooting - Tips and Hints to 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 dbd error ociserverattach 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 (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 li
listener (DBD ERROR: OCIServerAttach) [message #266840] Tue, 11 September 2007 14:34 babble Messages: 25Registered: July 2007 Location: new york Junior Member Hi Gurus OS :Red Hat Enterprise Linux 4 Oracle : 10.2.0.1 I Installed OEM .And when I'm trying to connect to DB through URL I get error message ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach) My listener is also up.. Can somebody help me to troubleshoot this problem. Regards Report message to a moderator Re: ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach) [message #266875 is a reply to message #266840] Tue, 11 September 2007 22:05 Arju Messages: 1554Registered: June 2007 Location: Dhaka,Bangladesh. Mobile:... Senior Member This is the things that came more than 100 times in this forum. Search. Report message to a moderator Re: ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach) [message #266943 is a reply to message #266840] Wed, 12 September 2007 01:16 Michel Cadot Messages: 63911Registered: March 2007 Location: Nanterre, France, http://... Senior MemberAccount Moderator ORA-12541: TNS:no listener *Cause: The connection request could not be completed because the listener is not running. *Action: Ensure that the supplied destination address matches one of the addresses used by the listener - compare the TNSNAMES.ORA entry with the appropriate LISTENER.ORA file (or TNSNAV.ORA if the connection is to go by way of an Interchange). Start the listener on the remote machine. Regards Michel Report message to a moderator Re: ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach) [message #267166 is a reply to message #266943] Wed, 12 September 2007 11:20 babble Messages: 25Registered: July 2007 Location: new york Junior Member Thanks for you replies I read forums before putting my question into forum. I dont know everything looks fine to me ,but sti