Php connect to oracle 8i,it occur ORA-12154

Warning: ociopen_server: Error while trying to retrieve text for error ORA-12154 in /SOHU/community/bbs/html/inc/dbcon.php3 on line 4

Do you have more than ONE oracle homes created?
Does your PATH env. variable correctly references the ORACLE_HOME directory?

Similar Messages

  • Oracle.DataAccess.Client.OracleException ORA-12154:

    Hi Experts,
    Please I need yours assistance.
    I developed an automation tool in visual studio 2010 using c# and oracle framework Oracle.DataAccess.Client. However, the tool is working properly on my machine but when deployed the tool to a different machine that has .net 4.0 framework installed, and when I tried to run the tool I kept getting the following error message below:
    "************** Exception Text **************
    Oracle.DataAccess.Client.OracleException ORA-12154: TNS:could not resolve the connect identifier specified at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
    at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
    at Oracle.DataAccess.Client.OracleConnection.Open()
    at LogicalDateValidator.Form1.conn(String oradb)
    at LogicalDateValidator.Form1.button3_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)"

    http://www.oracle.com/technetwork/topics/dotnet/odt-faq-085407.html#ORA-12154:_TNS:could_not_resolve_the

  • ORA- 12154 Error: while php connect to oracle?

    While I use OCILogon connect to Oracle9i,show error message as follow:
    Warning: ociopen_server: Error while trying to retrieve text for error ORA-12154 in /var/www/html/inc/sev.inc.php on line 57
    most of people think of its tnsname' problem,but I modify my tnsnames.ora,and sqlplus can connect with correct username and password.
    page source as follow:
    <?
    function db_connect()
    //putenv("ORACLE_SID=test");
    //putenv("NLS_LANG=SIMPLIFIED CHINESE.ZHS16CGB231280");
    putenv("ORACLE_HOME=/home/oracle/OraHome1");
    $connect = OCILogon("system","manager","test");
    if ($connect)
    return $connect;
    else
    return -1;
    ?>
    server Env: linux red hat 8.0,apache 2.0.44,php4.3.1,oracle9.2.0
    please! Thank in advance!

    Do you have more than ONE oracle homes created?
    Does your PATH env. variable correctly references the ORACLE_HOME directory?

  • PHP connecting on Oracle by hostname

    Hello,
    I need to know if is possible to connect PHP on remote Oracle 10g through Easy Connect(hostname), without Oracle Client.
    Regards
    Amanda

    No, it is not possible.

  • Problem with local apache w/php connect to oracle 9i server

    Is any way to connect to oracle 9i server listening on default port 1521 at any host using local apache w/php on windows xp...
    I've already installed all dlls oci drivers...
    but it seems doesn't work...I don't know how to make connection from php to oracle db...
    any suggestions and help?
    thx in advance
    btw I'm using client appliation to connecti witth that oracle db and it work fine..

    Lucas Mierzwa what error are you getting when you try to connect. Am using PHP 4.x on w2k and oracle 10g and Appach server and all work fine. I also run mysql and and IIS all on thesame local machine. They are all functioning fine. I can help you if i know what the problem is.

  • ODBC 10.2 test connection success but MSAccess/Office throws ORA-12154

    I've run into a difficult-to-solve problem. I'm troubleshooting an MSAccess to Oracle connection via Oracle ODBC driver issue.
    MSAccess was giving ORA "long" datatype error (can't remember error number) when using 11.2.1 driver against a years-old, tried-n-true app that was previously well behaved (only diff is use of that app with newer Oracle ODBC driver). Web search revealed problems with 11.2 ODBC driver and MSOffice tools so decided to swith to older ODBC driver. Had 10.2 ODBC driver also installed so switched to that. Now get ORA-12154 every time I try to connect with MSAccess via Oracle ODBC. Using the ODBC Admin (32 bit) allows SUCCESSFUL connection as does tnsping & other tools that use Oracle Net. Only MSAccess (or other MSOffice tools) do not.
    I've verified no other tnsnames.ora files or sqlnet.ora files available and have even gone as far as completely removing all things Oracle from the PC and reinstalling only the 10.2 client (custom mode; installed only the Oracle NET and ODBC 10.2 driver). I've turned on tracing to ADMIN level and read the trace files. trace for MSAccess call vs trace for ODBC administrator call yields nearly identical trace files till "niotns" step where the ODBC admin proceeds to connect and the MSAccess call just gives a few other coments then stops. NO apparent error messages. tnsnames IS found so don't understand why giving ORA-12154.
    All tools connect (tnsping works, SQL*Plus connects, ODBC admin test sucessful, TOAD connects) EXCEPT MSAccess. Problem is I have many, many MSAccess legacy apps/tools and cannot go without the fully working ODBC connection between MSAccess and Oracle.
    Help... desparate for new ideas to try since I've spent many hours searching and tried all known troubleshooting steps.
    Any ideas appreciated.
    Thanks,
    Mike

    Hi Mike,
    I have a similar error. I can connect to database with TNSPING, and I can also connect with SQL Developer. But I am unable to connect with Access using ODBC, I get ORA-12154 error. Am also completely stumped. So if anyone can help, I would appreciate it too.
    (P.S. I have tried on a number of PCs here in the office, on one PC I have here I can connect using Access and ODBC, I can see the tables, I pick on a table, it says "linking", but it never links - it just hangs forever.)
    Thanks for any pointers,
    Tom

  • PHP connection to Oracle basic question.

    Forgive me if I am missing a very basic piece of knowledge here.
    I have a small local web server I run with Apache 2.2.3 and PHP 5.1.6.
    I am working on a project that uses Oracle tables located on the corporate network servers.
    These tables are normally maintained by the IT department using TOAD. I'd like for the business process 'owners' to be able to maintain the tables themselves - but the company has limited TOAD licensing and some of the dependencies between tables are not readily apparent (especially to a non-IT person).
    Therefore I am trying to develop a simple web app to allow table updates, using PHP to connect to the Oracle tables. The idea is I'll put the app and web server on a USB stick for the designated business person to use. (yeah, I know - seems crazy, but the paperwork to get this all into a true 'production' system is impossible, and I really don't want to have to maintain these tables myself for the rest of my working life)
    I've got the basics of the app working through some MySQL tables, now I just need to know how to connect to the 'real' Oracle tables.
    Here's what I've gathered from my reading:
    I need to download Instant Client and install to my 'server' (on my USB stick)
    I need to change PHP.ini to enable the extension for php_oci8.dll
    I need to set some environment variables....and here is where I am lost.
    Are these environment variables on my web server?
    I am running my USB web server on a Windows XP system (as will the business users). But it doesn't make sense to me to set my PC's environment variables, because then I'd need to worry about ever PC the USB stick got used on.
    Could someone clear this up for me? I am sure I am just missing something very basic.
    Oh, and is there anything else I'm missing?
    Thanks for any help!
    mary

    Get it working on a full machine first, and then move to using the USB stick. Refer to Underground PHP and Oracle Manual for standard installation information.
    PHP/Apache will need to be able to find the Oracle Instant Client libraries. Normally on WIndows this is done with the PATH environment variable on the machine running the web server.
    -- cj
    PS your IT department might like the free SQL Developer tool from Oracle instead of TOAD.

  • Linked Servers - Sql server 2005 to connect to Oracle 11g using ldap.ora instead of tnsnames.ora

    We have a SQL Server 2005 64bit box that needs a linked server created to Oracle 11g 64bit box. I have all the Oracle client software installed and can successfully connect to the Oracle database using SQL+ on the SQL Server 2005 64bit box. When I create
    the linked server and select the OraOledb.Oracle provider, I get the TNSNames error. The Oracle server does not use tnsnames.ora it uses OLAP.ora to resolve. How do I get Linked server to stop trying to connect via TNSNames and use the OLAP.ora file instead?
    I can't find any articles for this specific issues. All Oracle examples tell you to use TNSNAMES. The Oracle server is not under my companies control so I can not force the vendor to use tnsnames instead of OLAP.

    Hi,
    Have you got a resolution?
    Thank you.

  • Apache/PHP connection to Oracle 9i under OpenVMS

    Hello,
    With CSWS 2 (apache)/PHP 1.3 (4.3.2) under OpenVMS 7.3.2 i'm actually trying to interface an Oracle 9i database located on the same server with no success.
    In my php.ini i've uncommented "extension=php_oci8.exe"
    In my apache$www:[000000]login.com i've added @orauser.com <SID>
    But... no connexion at that time... (php:ocilogon failed)
    Someone can help me ?
    Someone experienced such interface ?
    thanks in advance for all

    Frankly, I haven't seen an openvms setup :)
    Do you have the required oci libraries ? are they accessible to php?
    regards,
    --karthik

  • Ora 12154: TNS could not resolve connect identifier specified

    Hi,
    I have Oracle 11g (Release 1_32bit) Client on my C:\ drive which connect to a Remote 11g (11.1.0.7.0 - 64bit) server.
    I have installed 10g DB Server(10.2.0.1.0) and Oracle 10g Forms(Forms [32 Bit] Version 10.1.2.0.2 ) on my D:\ drive.
    When I try to connect to Oracle 10g DB from Forms using "Connect" button, I get following error:
    "ORA-12154: TNS: could not resolve the connect identifier specified"
    Tns and Listner files both are same in Developer_Suite home and 10g home.
    Can someone please help me with this error?
    Thanks

    "ORA-12154: TNS: could not resolve the connect identifier specified"
    $ oerr ora 12154
    12154, 00000, "TNS:could not resolve the connect identifier specified"
    // *Cause:  A connection to a database or other service was requested using
    // a connect identifier, and the connect identifier specified could not
    // be resolved into a connect descriptor using one of the naming methods
    // configured. For example, if the type of connect identifier used was a
    // net service name then the net service name could not be found in a
    // naming method repository, or the repository could not be
    // located or reached.
    // *Action:
    //   - If you are using local naming (TNSNAMES.ORA file):
    //      - Make sure that "TNSNAMES" is listed as one of the values of the
    //        NAMES.DIRECTORY_PATH parameter in the Oracle Net profile
    //        (SQLNET.ORA)
    //      - Verify that a TNSNAMES.ORA file exists and is in the proper
    //        directory and is accessible.
    //      - Check that the net service name used as the connect identifier
    //        exists in the TNSNAMES.ORA file.
    //      - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA
    //        file.  Look for unmatched parentheses or stray characters. Errors
    //        in a TNSNAMES.ORA file may make it unusable.
    //   - If you are using directory naming:
    //      - Verify that "LDAP" is listed as one of the values of the
    //        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
    //        (SQLNET.ORA).
    //      - Verify that the LDAP directory server is up and that it is
    //        accessible.
    //      - Verify that the net service name or database name used as the
    //        connect identifier is configured in the directory.
    //      - Verify that the default context being used is correct by
    //        specifying a fully qualified net service name or a full LDAP DN
    //        as the connect identifier
    //   - If you are using easy connect naming:
    //      - Verify that "EZCONNECT" is listed as one of the values of the
    //        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
    //        (SQLNET.ORA).
    //      - Make sure the host, port and service name specified
    //        are correct.
    //      - Try enclosing the connect identifier in quote marks.
    //   See the Oracle Net Services Administrators Guide or the Oracle
    //   operating system specific guide for more information on naming.
    $
    Tns and Listner files both are same in Developer_Suite home and 10g home.Listener files are totally useless in Developer Suite home, since they are server files.

  • URGENT ::  ORA-12154: TNS:could not resolve service name

    Hi All,
    I am connecting to the db using oracle thin driver in java. I am invoking a SOAP call and after getting the response, i am inserting the response(gen. a pdf file) into my DB. I am using a static connection. I have to insert 130 pdf's in DB. After processing 120 pdf's, the following error has occurred,
    ERROR DBUtil - ORA-12154: TNS:could not resolve service name
    java.lang.NullPointerException
         at com.elsevier.cds.ew.DBUtil.insertPDF(Compiled Code)
         at com.elsevier.cds.ew.GenerateSoapRequest.generateSOAPCall(Compiled Code)
         at com.elsevier.cds.ew.EOffprintLoad.processPDFFiles1(Compiled Code)
         at com.elsevier.cds.ew.EOffprintLoad.init1(Compiled Code)
         at com.elsevier.cds.ew.EOffprintLoad.<init>(EOffprintLoad.java:138)
         at com.elsevier.cds.ew.EOffprintLoad.main(EOffprintLoad.java:987)
    ERROR GenerateSoapRequest -
    ERROR DBUtil - ORA-12154: TNS:could not resolve service name.
    The checked the oracle listener status. It was UP.
    Can anyone help me in this issue.
    Thanks,
    Rag

    Hello,
    Make sure that the service which you have specified in jdbc for making connection with oracle, exists in TNSNAMES.ORA file. You will find this file at different locations in 8i and above. So, better search for it. And add you service name in it. Example services is given in this file itself. So, take help from them.

  • Hi...Please help...Getting ORA 12154 TNS Listener could not resolve...

    Hi,
    I have just loaded Oracle 10g Rel 2 in Win 2003 Enterprise Edition.
    But when I try to connect to sqlplus, I am getting ORA -12154 : TNS: Listener could not resolve the connect identified specified.
    I have registered the database, the listener and tnsnames have been set correctly.
    I have also set the Oracle Home environment variable.
    Still getting the error.
    Any help will be highly appreciated.
    Thanks,

    I agree
    ORA-12145: (does not exist in the standard manuals)
    ORA-12154: TNS:could not resolve the connect identifier specified
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    ORA-12541: TNS:no listener
    It is pretty easy to fat-finger these 4 message numbers. As a result, when a person has the actual and complete error message and an error number for a different message, it is usually not a bad idea to use the actual message. (Based on transposing only 3 digits compared to typing over 50 characters correctly.)
    In this case the OP has really bollixed things: Subject implies a true 12154, text in the thread is an actual 12514 but mentions 12154.
    As a result, there are several potentially correct answers, depending on the interpretation of the question.
    - sb92075 gave the correct answer based on the number
    - I gave the correct answer based on the message in the thread
    - Anurag and Ed gave the correct answer based on 'the question is not formed correctly'
    Edited by: Hans Forbrich on Jan 24, 2010 7:13 AM
    (BTW - ORA-12415 and ORA-12451 are the other permutations ... described http://download.oracle.com/docs/cd/B19306_01/server.102/b14219/e12400.htm#sthref3357)

  • ORA-12154 TNS Could not resolve the service name

    I am working on Oracle 9i(Release 2) windows version. I want to change the value of
    shared pool size, buffer size and others database parameter through "Enterprise Manager Console" but
    when i connect to sysdba mode message comes "ORA-12154 TNS Could not resolve the service name".
    How can I solve this problem?

    these problem are you getting from OEM?
    post
    lsnrctl status
    lsnrctl services
    make sure database is running.. all the services running in services.msc
    check error code and start..
    ORA-12514:
         TNS:listener does not currently know of service requested in connect descriptor
    Cause:      The listener received a request to establish a connection to a database or other service. The connect descriptor received by the listener specified a service name for a service (usually a database service) that either has not yet dynamically registered with the listener or has not been statically configured for the listener. This may be a temporary condition such as after the listener has started, but before the database instance has registered with the listener.
    Action:      
    - Wait a moment and try to connect a second time.
    - Check which services are currently known by the listener by executing: lsnrctl services <listener name>
    - Check that the SERVICE_NAME parameter in the connect descriptor of the net service name used specifies a service known by the listener.
    - If an easy connect naming connect identifier was used, check that the service name specified is a service known by the listener.
    - Check for an event in the listener.log file.

  • Connection to oracle via php

    hi,
    I am making a site with a connection to oracle Xe but I am not able to connect me;
    here script:
    <?php $user = @$_post['login'];
    $passwd = @$_post['pass'];
    $bd = "(DESCRIPTION =(ADDRESS =(PROTOCOL = TCP)
    (HOST = titanium)(PORT = 1521))
    (CONNECT_DATA=(SERVER = DEDICATED)
    (SERVICE_NAME = XE)))";
    $conn = ocilogon($user, $passwd, $bd);
    $query = "select * from cabine";
    $stid = OCIParse($conn, $query);
    ociexecute($stid);
    while (ocifetch($stid)) {
    echo "\n";
    $ncols = ocinumcols($stid);
    for ($i = 1; $i <= $ncols; $i++) {
    $column_name = ocicolumnname($stid, $i);
    $column_value = ociresult($stid, $i);
    echo $column_name . ': ' . $column_value . "\n";
    echo "\n";
    ocifreestatement($stmt);
    ?>
    I use easyphp 1.0, and oracle express edition;
    here error message:
    Warning: ocilogon(): OCISessionBegin: ORA-01017: nom utilisateur/mot de passe non valide ; connexion refusée in c:\program files\easyphp1-8\www\facture.php
    what must I modify to make function the connection. Thank

    Try echo'ing the username & password to check they are set correctly.
    Is the user account created and unlocked?
    This free book has some useful information on PHP and Oracle: http://tinyurl.com/f8jad
    -- cj

  • EXP-00056: ORACLE error 4021 encountered ORA-04021: timeout occurred while

    hi all oracle gurus ,
    i have this problem which i am facing its like this.i have a batch file that runs export every night one week back it was all okay .few days back when i looked the log files it gives me this error ---EXP-00056: ORACLE error 4021 encountered
    ORA-04021: timeout occurred while waiting to lock object
    what should i do this is a production database runing in windows platform and there is no backup pls help me .....
    export log file -------
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user PILOT
    . exporting foreign function library names for user FINANCE
    . exporting foreign function library names for user MBCNEWS
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user PILOT
    . exporting object type definitions for user FINANCE
    . exporting object type definitions for user MBCNEWS
    About to export PILOT's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    EXP-00056: ORACLE error 4021 encountered
    ORA-04021: timeout occurred while waiting to lock object
    ORA-06512: at "SYS.DBMS_METADATA", line 1511
    ORA-06512: at "SYS.DBMS_METADATA", line 1548
    ORA-06512: at "SYS.DBMS_METADATA", line 1864
    ORA-06512: at "SYS.DBMS_METADATA", line 3707
    ORA-06512: at "SYS.DBMS_METADATA", line 3689
    ORA-06512: at line 1
    EXP-00000: Export terminated unsuccessfully
    robyav

    this is a production database runing in windows platform and there is no backup
    what should iWell first of all you should stop using EXP for backups, it's quite unsuitable, and start using RMAN instead. Find out more.
    If you have a Metalink account you shoudl read Note:298968.1. But teh headline is there is a bug in 10gR1 which is fixed in 10gR2. This may not help you much. The workaround is to try running the export again later, which may not be any more helpful.
    Cheers, APC

Maybe you are looking for

  • Picture Included. Mid 2012 13 inch Macbook Pro green/purple lines on screen. Freezes. Sometimes 3 beeps.

    Alright I have a Mid 2012 13 inch Macbook Pro purchased in June 2012. For about the last month, I have this issue where as I am using it random colored lines will show up on the screen (lines usually green, purple, but occasionally the issue occurs w

  • Error When Signing a Document (Using a new digital ID)

    After designating a digital signature and attempting to save, I receive the following error: Creation of this signature could not be completed. Could not create appearance stream. I attempted to try this on another computer and still the same error.

  • Error 46 when installing QuickTime

    Every time I try to install Quicktime I get error 46 cannot find or load Quicktime ActiveX control. I have tried every variation of relaoding iTunes and Quicktime, Stand alone version together nothing seems to work. My iTunes loads fine and I can pla

  • How to clear a record of control block

    i have one control block with 2 items and the Max. records displayed property is set to 10.I have populated 5 records and now i want to clear one record, but the clear_record statement does not seem to be working. How to clear a record in a control b

  • Javascript to hide the end of a video

    About two years ago Dave Merchant wrote in this forum: You can deactivate a video (returning to the poster image) using Acrobat JavaScript, but can't make it happen automatically at the end of playback unless you use a custom videoplayer widget. The