Php Fatal Error Ora-12154
Contents |
Sign in Pricing Blog Support Search GitHub This repository Watch 54 Star 276 Fork 109 joeferner/node-oracle Code Issues 98 Pull requests 13 Projects 0 Pulse Graphs New php oci_connect example issue ORA-12154: TNS:could not resolve the connect identifier specified #59 Closed thaumant opened oci_connect not working in php this Issue Jul 10, 2013 · 31 comments Projects None yet Labels None yet Milestone No milestone call to undefined function oci_connect() Assignees No one assigned 8 participants thaumant commented Jul 10, 2013 Here is the code: var oracle = require("oracle"); var conData = { tns: '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=mysid)))', user: 'myname', password: 'mypass' };
Ora 12154 Tns Could Not Resolve The Connect Identifier Specified 11g
oracle.connect(conData, function(err, con){ if (err) console.log('ERROR', err); else console.log('OK', con); }); And I get: ERROR [Error: ORA-12154: TNS:could not resolve the connect identifier specified] Connection data is correct. I have php installed with oci extension and it connects with the same copypasted connection string, username and password. SQLPlus also works. I also tried to use: an object with "hostname" and "database" properties instead tns could not resolve the connect identifier specified sqlplus of "tns", easy connect string, reference to tnsnames.ora, random strings in all properties, like @#$%^&*(, empty object { }. I see the same error 12154 in each case, no matter what data I put in the conData variable. Some info about my environment: ORACLE_HOME=/usr/lib/oracle/11.2/client64 OCI_INCLUDE_DIR=/usr/include/oracle/11.2/client64 OCI_LIB_DIR=/usr/lib/oracle/11.2/client64/lib TNS_ADMIN=/usr/lib/oracle/11.2/client64/network/admin $ uname -rvio 3.8.0-21-generic #32-Ubuntu SMP Tue May 14 22:16:46 UTC 2013 x86_64 GNU/Linux $ node --version v0.10.12 Thanks! kontrafiktion commented Jul 10, 2013 Please try the following: Put the connection string into your tnsnames.ora: FOOBAR = (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=mysid))) than try that connection with sqlplus. If it works try to connect with node.js using: var conData = { tns: 'FOOBAR', user: 'myname', password: 'mypass' }; kontrafiktion commented Jul 10, 2013 If you use 'hostname' and 'database' properties, you shouldn't get I see the same error 12154 in each case AFAIK the 12154 is a TNS error, and the database/hostname properties do not use TNS. Please check that you really get that error. To me it sounds like you accidentally start the same (unchanged) js-file again and again. thaumant commented Jul 10, 2013 Funny, I also was surprised and at some point be
SQL dialects Javascript Disabled Detected You currently have javascript disabled. Several functions may not work. Please re-enable javascript to access full functionality. [SOLVED] ORA-12154: TNS:could connect to oracle database php not resolve the connect identifier specified Started by Piba, May 07 2008 08:29
Oci_parse
AM Please log in to reply 5 replies to this topic #1 Piba Piba Member Members 25 posts Posted
Fatal Error: Uncaught Error: Call To Undefined Function Oci_connect()
07 May 2008 - 08:29 AM Hello guys, Ok, i'm working on php/mysql but now i want to deal with oracle (on other server), So i installed instantclient-sqlplus-win32 for oracle, and when https://github.com/joeferner/node-oracle/issues/59 i open phpinfo page, the oci8 is enabled But my problem is when i connect to db, this error is show up ORA-12154: TNS:could not resolve the connect identifier specified My coonect code: https://forums.phpfreaks.com/topic/104520-solved-ora-12154-tnscould-not-resolve-the-connect-identifier-specified/ errors else { echo 'I am an Oracle mack daddy.'; } ?> I checked from the file tnsname.ora But when i searched on google to find solution, i read that it should be a file named sqlnet.ora And i don't have this file... Is this my problem?? Shall i got both sqlnet.ora and tnsname.ora files?? Please i need help as soon as possible Thanks Back to top #2 gizmola gizmola Advanced Member Administrators 4,418 posts LocationLos Angeles, CA USA Posted 09 May 2008 - 06:54 PM The tnsnames.ora file is like DNS for oracle instances. Basically what that error is telling you is that it can't convert the oracle instance name you're providing to a Server/IP/Port combination.The sqlnet.ora file allows you to configure sql*net which is oracle's network protocol. Needless to say, these are 2 totally seperate things. With that said, you probably want to try and use the oracle connection string that allows you to circumvent the need for a tnsnames.ora file. There's a nice summary blog post here: http://alisonatoracl...strings-in.html Follow me on Twitter | My blog | LA PHP Developers Group | Movie Review Site| Have you read the TOS?
and Objects Namespaces Errors Exceptions Generators References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and http://php.net/manual/en/function.oci-connect.php Classes Context options and parameters Supported Protocols and Wrappers http://forums.devnetwork.net/viewtopic.php?f=1&p=592462 Security Introduction General considerations Installed as CGI binary Installed as an Apache module Session Security Filesystem Security Database Security Error Reporting Using Register Globals User Submitted Data Magic Quotes Hiding PHP Keeping Current Features HTTP authentication fatal error with PHP Cookies Sessions Dealing with XForms Handling file uploads Using remote files Connection handling Persistent Database Connections Safe Mode Command line usage Garbage Collection DTrace Dynamic Tracing Function Reference Affecting PHP's Behaviour Audio Formats Manipulation Authentication Services Command Line Specific Extensions Compression and call to undefined Archive Extensions Credit Card Processing Cryptography Extensions Database Extensions Date and Time Related Extensions File System Related Extensions Human Language and Character Encoding Support Image Processing and Generation Mail Related Extensions Mathematical Extensions Non-Text MIME Output Process Control Extensions Other Basic Extensions Other Services Search Engine Extensions Server Specific Extensions Session Extensions Text Processing Variable and Type Related Extensions Web Services Windows Only Extensions XML Manipulation GUI Extensions Keyboard Shortcuts? This help j Next menu item k Previous menu item g p Previous man page g n Next man page G Scroll to bottom g g Scroll to top g h Goto homepage g s Goto search(current page) / Focus search box oci_define_by_name » « oci_commit PHP Manual Function Reference Database Extensions Vendor Specific Database Extensions OCI8 OCI8 Functions Change language: Engli
index All times are UTC - 5 hours Information The requested topic does not exist. Board index All times are UTC - 5 hours Powered by phpBB Forum Software © phpBB Group