ORA-12154: Help Pls

Hi, all,
Under red hat linux 6.2, I have a OCI program running as mail delivery program for qmail, which is invoked by qmail-local when new mail is coming. This program runs fine in shell ( for testing ), but always gets ORA-12154 error ( could not resolve service name ? ) during login process when it is invoked by qmail.
Since it can be run in shell, I suppose the configuration of net service is correct. However, what is the difference between those two situation? Has it anything to do with security?
Any help would be appreciated.

Sorry, forget to say that I am using Oracle release 8.1.6 client for linux

Similar Messages

  • Error message ORA-12154, pls help

    Have got 2 database( A and B) on the same machine, A is the main database while B is meant to be the recovery catalog database, I have been able to create the catalog tablespace, but when I want to register the database from the target database from the RMAN command line with connect [b]catalog "rman_user/rman_user@B", its gives an error message of ORA-12154---TNS : could not resolve the connect identifier specified. I using windows environment, thanks in advance

    Did you create a TNS alias for B database ? If not, you can use Net Configuration Assistant, in the Oracle menu, for that.
    If you did already create B TNS alias, then try "tnsping B" : if result is OK, then try connecting to B DB from Sql*Plus :
    C:\> sqlplus rman_user/rman_user@B

  • Oracle 10g installation ora 12154 i really need help anyone

    history: reinstallation, can't pass ora 12154; system windows xp sp2 problem ora 12154
    Destination Folder: L:\oraclexe\
    Port for 'Oracle Database Listener': 1521
    Port for 'Oracle Services for Microsoft Transaction Server': 2030
    Port for HTTP Listener: 8081
    My friend, I believe you created a mess by Installing Oracle 10g Enterprise with your DHCP enable in Windows.
    There are only 2 options if you want to install Oracle 10g Enterprise on Windows.
    1. You install it using Static IP or not connected to network
    2. You install Microsoft Loopback, it is a virtual Network driver and this should be assigned as your primary Network driver instead of your current Network.
    So if you don't want any headache, the easiest way is uninstall your Oracle 10g, disable the DHCP and use static instead, then install again. that will work for sure.
    Don't try to play with the listener and everything because you will get into deeper and deeper problem that end up into frustration :(
    cheers
    Edited by: Chubbyd4d on May 19, 2009 12:58 PM
    Destination Folder: L:\oraclexe\
    Port for 'Oracle Database Listener': 1521
    Port for 'Oracle Services for Microsoft Transaction Server': 2030
    Port for HTTP Listener: 8081
    My friend, I believe you created a mess by Installing Oracle 10g Enterprise with your DHCP enable in Windows.
    There are only 2 options if you want to install Oracle 10g Enterprise on Windows.
    1. You install it using Static IP or not connected to network
    2. You install Microsoft Loopback, it is a virtual Network driver and this should be assigned as your primary Network driver instead of your current Network.
    So if you don't want any headache, the easiest way is uninstall your Oracle 10g, disable the DHCP and use static instead, then install again. that will work for sure.
    Don't try to play with the listener and everything because you will get into deeper and deeper problem that end up into frustration :(
    cheers
    Edited by: Chubbyd4d on May 19, 2009 12:58 PM
    clean start
    ================================================================================================================
    Output generated from configuration assistant "Oracle Net Configuration Assistant":
    Parsing command line arguments:
    Parameter "orahome" = N:\oracle10g
    Parameter "orahnam" = OraDb10g_home1
    Parameter "instype" = typical
    Parameter "inscomp" = client,oraclenet,javavm,server,ano
    Parameter "insprtcl" = tcp,nmp
    Parameter "cfg" = local
    Parameter "authadp" = NO_VALUE
    Parameter "nodeinfo" = NO_VALUE
    Parameter "responsefile" = N:\oracle10g\network\install\netca_typ.rsp
    Done parsing command line arguments.
    Oracle Net Services Configuration:
    Profile configuration complete.
    The information provided for this listener is currently in use by other software on this computer.
    Listener start failed. Listener may already be running.
    Listener configuration complete.
    Default local naming configuration complete.
    Oracle Net Services configuration successful. The exit code is 0
    Configuration assistant "Oracle Net Configuration Assistant" succeeded
    ================================================================================================================
    Output generated from configuration assistant "iSQL*Plus Configuration Assistant":
    iSQL*Plus 10.1.0.2.0
    Copyright (c) 2004 Oracle. All rights reserved.
    Starting iSQL*Plus ...
    iSQL*Plus started.
    Configuration assistant "iSQL*Plus Configuration Assistant" succeeded
    ================================================================================================================
    Output generated from configuration assistant "Oracle Database Configuration Assistant":
    Configuration assistant "Oracle Database Configuration Assistant" failed
    ================================================================================================================
    Output generated from configuration assistant "Oracle Database Configuration Assistant" (attempt 2):
    Configuration assistant "Oracle Database Configuration Assistant" failed
    ================================================================================================================
    Output generated from configuration assistant "Oracle Database Configuration Assistant" (attempt 3):
    Configuration assistant "Oracle Database Configuration Assistant" failed
    install microsoft loop back adapter okay
    ip 10.10.1.1
    255.255.255.0
    still ora 12154
    disable dhcp client on services.msc
    still ora 12154
    pls help
    this is a fresh install
    do i need to remove my oracle 10xe which is perfect working installed on a different drive
    pls help me
    Edited by: oraclehelper on May 20, 2009 1:45 AM

    Destination Folder: L:\oraclexe\
    Port for 'Oracle Database Listener': 1521
    Port for 'Oracle Services for Microsoft Transaction Server': 2030
    Port for HTTP Listener: 8081
    My friend, I believe you created a mess by Installing Oracle 10g Enterprise with your DHCP enable in Windows.
    There are only 2 options if you want to install Oracle 10g Enterprise on Windows.
    1. You install it using Static IP or not connected to network
    2. You install Microsoft Loopback, it is a virtual Network driver and this should be assigned as your primary Network driver instead of your current Network.
    So if you don't want any headache, the easiest way is uninstall your Oracle 10g, disable the DHCP and use static instead, then install again. that will work for sure.
    Don't try to play with the listener and everything because you will get into deeper and deeper problem that end up into frustration :(
    cheers
    Edited by: Chubbyd4d on May 19, 2009 12:58 PM
    Destination Folder: L:\oraclexe\
    Port for 'Oracle Database Listener': 1521
    Port for 'Oracle Services for Microsoft Transaction Server': 2030
    Port for HTTP Listener: 8081
    My friend, I believe you created a mess by Installing Oracle 10g Enterprise with your DHCP enable in Windows.
    There are only 2 options if you want to install Oracle 10g Enterprise on Windows.
    1. You install it using Static IP or not connected to network
    2. You install Microsoft Loopback, it is a virtual Network driver and this should be assigned as your primary Network driver instead of your current Network.
    So if you don't want any headache, the easiest way is uninstall your Oracle 10g, disable the DHCP and use static instead, then install again. that will work for sure.
    Don't try to play with the listener and everything because you will get into deeper and deeper problem that end up into frustration :(
    cheers
    Edited by: Chubbyd4d on May 19, 2009 12:58 PM
    clean start
    ================================================================================================================
    Output generated from configuration assistant "Oracle Net Configuration Assistant":
    Parsing command line arguments:
    Parameter "orahome" = N:\oracle10g
    Parameter "orahnam" = OraDb10g_home1
    Parameter "instype" = typical
    Parameter "inscomp" = client,oraclenet,javavm,server,ano
    Parameter "insprtcl" = tcp,nmp
    Parameter "cfg" = local
    Parameter "authadp" = NO_VALUE
    Parameter "nodeinfo" = NO_VALUE
    Parameter "responsefile" = N:\oracle10g\network\install\netca_typ.rsp
    Done parsing command line arguments.
    Oracle Net Services Configuration:
    Profile configuration complete.
    The information provided for this listener is currently in use by other software on this computer.
    Listener start failed. Listener may already be running.
    Listener configuration complete.
    Default local naming configuration complete.
    Oracle Net Services configuration successful. The exit code is 0
    Configuration assistant "Oracle Net Configuration Assistant" succeeded
    ================================================================================================================
    Output generated from configuration assistant "iSQL*Plus Configuration Assistant":
    iSQL*Plus 10.1.0.2.0
    Copyright (c) 2004 Oracle. All rights reserved.
    Starting iSQL*Plus ...
    iSQL*Plus started.
    Configuration assistant "iSQL*Plus Configuration Assistant" succeeded
    ================================================================================================================
    Output generated from configuration assistant "Oracle Database Configuration Assistant":
    Configuration assistant "Oracle Database Configuration Assistant" failed
    ================================================================================================================
    Output generated from configuration assistant "Oracle Database Configuration Assistant" (attempt 2):
    Configuration assistant "Oracle Database Configuration Assistant" failed
    ================================================================================================================
    Output generated from configuration assistant "Oracle Database Configuration Assistant" (attempt 3):
    Configuration assistant "Oracle Database Configuration Assistant" failed
    install microsoft loop back adapter okay
    ip 10.10.1.1
    255.255.255.0
    still ora 12154
    disable dhcp client on services.msc
    still ora 12154
    pls help
    this is a fresh install
    do i need to remove my oracle 10xe which is perfect working installed on a different drive
    pls help me

  • PLEASE HELP!!!!!!! ORA-12154

    I installed Oracle10g XE on my laptop on VISTA.
    Im able to connect to sqlplus using -> sqlplus system/password@XE
    Then i installed PL/SQL developer and Im NOT ABLE TO CONNECT with the same credentials. Throws me error: ORA-12154:TNS:Could not resolve the connect identifier Specified
    2. My Listener status is:
    C:\Users\avishek>lsnrctl status
    4. My LSNRCTL for 32-bit Windows:
    Version 10.2.0.1.0 - Production on 05-JUN-2008 23:47:12
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 05-JUN-2008 22:03:03
    Uptime 0 days 1 hr. 44 min. 9 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Default Service XE
    Listener Parameter File C:\oraclexe\app\oracle\product\10.2.0\server\network\a
    dmin\listener.ora
    Listener Log File C:\oraclexe\app\oracle\product\10.2.0\server\network\l
    og\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=AvisLaptop)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=
    HTTP)(Session=RAW))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
    Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "XEXDB" has 1 instance(s).
    Instance "xe", status READY, has 1 handler(s) for this service...
    Service "XE_XPT" has 1 instance(s).
    Instance "xe", status READY, has 1 handler(s) for this service...
    Service "xe" has 1 instance(s).
    Instance "xe", status READY, has 1 handler(s) for this service...
    The command completed successfully
    4. My TNSNAMES.ora is:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (ADDRESS = (PROTOCOL = TCP)(HOST = AvisLaptop)(PORT = 1521))
    DEFAULT_SERVICE_LISTENER = (XE)
    5. My SQLNET.ora has this entry:
    SQLNET.AUTHENTICATION_SERVICES = (NTS)
    6. My listener.ora entry is:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (ADDRESS = (PROTOCOL = TCP)(HOST = AvisLaptop)(PORT = 1521))
    DEFAULT_SERVICE_LISTENER = (XE)
    7. I ve only one copy of each of the above mentioned .ora files
    8. PLEASE HELP!!!!!!!
    9. thanks in advance

    Hi Peter
    Thanks for ur reply!
    1. I jus have one Oracle Home installed on my laptop (vista). there is jus one ORACLE_HOME Environment variable! Only one installation of oracle!!!!
    2. Yes, I did try to connect thru Sqlplus and Im able to connect.
    3. listener log is:
    TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production on 06-JUN-2008 00:53:44
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    System parameter file is C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\listener.ora
    Log messages written to C:\oraclexe\app\oracle\product\10.2.0\server\network\log\listener.log
    Trace information written to C:\oraclexe\app\oracle\product\10.2.0\server\network\trace\listener.trc
    Trace level is currently 0
    Started with pid=2768
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=AvisLaptop)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    06-JUN-2008 00:53:48 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=avishek))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=169869568)) * status * 0
    No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
    No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=AvisLaptop)(PORT=1521)))
    Listener completed notification to CRS on stop
    06-JUN-2008 00:53:48 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=avishek))(COMMAND=stop)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=169869568)) * stop * 0
    TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production on 06-JUN-2008 00:53:52
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    System parameter file is C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\listener.ora
    Log messages written to C:\oraclexe\app\oracle\product\10.2.0\server\network\log\listener.log
    Trace information written to C:\oraclexe\app\oracle\product\10.2.0\server\network\trace\listener.trc
    Trace level is currently 0
    Started with pid=2328
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=AvisLaptop)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    06-JUN-2008 00:54:23 * service_register * xe * 0
    06-JUN-2008 00:55:29 * service_update * xe * 0
    06-JUN-2008 00:55:31 * service_update * xe * 0
    06-JUN-2008 00:55:33 * service_died * xe * 12537
    06-JUN-2008 00:55:37 * service_register * xe * 0
    06-JUN-2008 00:55:38 * service_update * xe * 0
    06-JUN-2008 00:55:40 * service_update * xe * 0
    06-JUN-2008 00:55:55 * service_update * xe * 0
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    06-JUN-2008 00:55:58 * service_update * xe * 0
    06-JUN-2008 00:56:04 * service_update * xe * 0
    06-JUN-2008 00:56:07 * service_update * xe * 0
    06-JUN-2008 00:56:10 * service_update * xe * 0
    06-JUN-2008 00:56:10 * service_update * xe * 0
    06-JUN-2008 00:56:16 * service_update * xe * 0
    06-JUN-2008 00:56:22 * service_update * xe * 0
    No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    06-JUN-2008 00:56:25 * service_update * xe * 0
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=AvisLaptop)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    06-JUN-2008 00:56:25 * service_update * xe * 0
    06-JUN-2008 00:56:28 * service_update * xe * 0
    06-JUN-2008 00:56:31 * service_update * xe * 0
    No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=AvisLaptop)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    06-JUN-2008 00:56:34 * service_died * xe * 12537
    06-JUN-2008 00:56:37 * service_register * xe * 0
    06-JUN-2008 00:56:38 * service_update * xe * 0
    06-JUN-2008 00:56:44 * service_update * xe * 0
    06-JUN-2008 00:56:47 * service_update * xe * 0
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    06-JUN-2008 00:56:50 * service_update * xe * 0
    06-JUN-2008 00:56:53 * service_update * xe * 0
    06-JUN-2008 00:56:56 * service_update * xe * 0
    06-JUN-2008 00:57:16 * http * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=49185)) * handoff * http * 0
    06-JUN-2008 00:57:26 * http * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=49189)) * handoff * http * 0
    06-JUN-2008 00:57:35 * service_update * xe * 0
    06-JUN-2008 00:57:53 * service_update * xe * 0
    06-JUN-2008 00:58:00 * http * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=49190)) * handoff * http * 0
    06-JUN-2008 00:58:05 * http * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=49191)) * handoff * http * 0
    06-JUN-2008 00:58:26 * service_update * xe * 0
    No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    06-JUN-2008 01:03:36 * service_died * xe * 12547
    TNS-12547: TNS:lost contact
    TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production on 06-JUN-2008 01:04:41
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    System parameter file is C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\listener.ora
    Log messages written to C:\oraclexe\app\oracle\product\10.2.0\server\network\log\listener.log
    Trace information written to C:\oraclexe\app\oracle\product\10.2.0\server\network\trace\listener.trc
    Trace level is currently 0
    Started with pid=2120
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=AvisLaptop)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    06-JUN-2008 01:04:58 * service_register * xe * 0
    06-JUN-2008 01:05:19 * service_update * xe * 0
    06-JUN-2008 01:05:22 * service_update * xe * 0
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    06-JUN-2008 01:05:25 * service_update * xe * 0
    06-JUN-2008 01:05:28 * service_update * xe * 0
    06-JUN-2008 01:05:34 * service_update * xe * 0
    06-JUN-2008 01:05:52 * service_update * xe * 0
    06-JUN-2008 01:07:55 * service_update * xe * 0
    06-JUN-2008 01:08:24 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)(CID=(PROGRAM=C:\oraclexe\app\oracle\product\10.2.0\server\BIN\sqlplus.exe)(HOST=AVISLAPTOP)(USER=avishek))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.12)(PORT=49173)) * establish * XE * 0
    06-JUN-2008 01:08:25 * service_update * xe * 0
    06-JUN-2008 01:14:25 * service_update * xe * 0
    No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    06-JUN-2008 01:14:42 * service_died * xe * 12547
    TNS-12547: TNS:lost contact
    TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production on 06-JUN-2008 21:46:07
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    System parameter file is C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\listener.ora
    Log messages written to C:\oraclexe\app\oracle\product\10.2.0\server\network\log\listener.log
    Trace information written to C:\oraclexe\app\oracle\product\10.2.0\server\network\trace\listener.trc
    Trace level is currently 0
    Started with pid=2340
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=AvisLaptop)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    06-JUN-2008 21:46:13 * service_register * xe * 0
    06-JUN-2008 21:46:19 * service_update * xe * 0
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    06-JUN-2008 21:46:22 * service_update * xe * 0
    06-JUN-2008 21:46:25 * service_update * xe * 0
    06-JUN-2008 21:46:31 * service_update * xe * 0
    06-JUN-2008 21:46:52 * service_update * xe * 0
    06-JUN-2008 21:47:25 * service_update * xe * 0
    06-JUN-2008 21:49:46 * service_update * xe * 0
    06-JUN-2008 21:55:31 * service_update * xe * 0
    06-JUN-2008 21:57:22 * service_update * xe * 0
    06-JUN-2008 21:57:31 * service_update * xe * 0
    06-JUN-2008 22:03:40 * service_update * xe * 0
    06-JUN-2008 22:04:25 * service_update * xe * 0
    06-JUN-2008 22:06:10 * service_update * xe * 0
    06-JUN-2008 22:07:28 * service_update * xe * 0
    06-JUN-2008 22:11:01 * service_update * xe * 0
    06-JUN-2008 22:13:25 * service_update * xe * 0
    06-JUN-2008 22:17:34 * service_update * xe * 0
    06-JUN-2008 22:27:34 * service_update * xe * 0
    06-JUN-2008 22:32:00 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)(CID=(PROGRAM=C:\oraclexe\app\oracle\product\10.2.0\server\BIN\sqlplus.exe)(HOST=AVISLAPTOP)(USER=avishek))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.12)(PORT=49440)) * establish * XE * 0
    06-JUN-2008 22:32:01 * service_update * xe * 0
    06-JUN-2008 22:32:37 * service_update * xe * 0
    No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    06-JUN-2008 22:34:08 * service_died * xe * 12547
    TNS-12547: TNS:lost contact
    TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production on 06-JUN-2008 22:35:14
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    System parameter file is C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\listener.ora
    Log messages written to C:\oraclexe\app\oracle\product\10.2.0\server\network\log\listener.log
    Trace information written to C:\oraclexe\app\oracle\product\10.2.0\server\network\trace\listener.trc
    Trace level is currently 0
    Started with pid=2248
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=AvisLaptop)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    06-JUN-2008 22:35:35 * service_register * xe * 0
    06-JUN-2008 22:35:41 * service_update * xe * 0
    06-JUN-2008 22:35:56 * service_update * xe * 0
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    06-JUN-2008 22:35:59 * service_update * xe * 0
    06-JUN-2008 22:36:02 * service_update * xe * 0
    06-JUN-2008 22:36:08 * service_update * xe * 0
    06-JUN-2008 22:36:29 * service_update * xe * 0
    06-JUN-2008 22:36:43 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)(CID=(PROGRAM=C:\oraclexe\app\oracle\product\10.2.0\server\BIN\sqlplus.exe)(HOST=AVISLAPTOP)(USER=avishek))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.12)(PORT=49167)) * establish * XE * 0
    06-JUN-2008 22:36:45 * service_update * xe * 0
    06-JUN-2008 22:37:36 * http * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=49173)) * handoff * http * 0
    06-JUN-2008 22:37:45 * http * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=49177)) * handoff * http * 0
    06-JUN-2008 22:39:27 * service_update * xe * 0
    06-JUN-2008 22:41:54 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)(CID=(PROGRAM=C:\oraclexe\app\oracle\product\10.2.0\server\BIN\sqlplus.exe)(HOST=AVISLAPTOP)(USER=avishek))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.12)(PORT=49228)) * establish * XE * 0
    06-JUN-2008 22:41:57 * service_update * xe * 0
    06-JUN-2008 22:50:54 * service_update * xe * 0
    06-JUN-2008 22:51:42 * service_update * xe * 0
    4. Credentials im giving for PLSQL dev are:
    Username: system
    Pwd: <my passwrd>
    Database: XE
    Connect as: Normal
    Please help peter...thanks in advance!
    Avi.

  • 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)

  • PLEASE HELP!  Installation error :ORA-12154 - TNS

    Hi everyone,
    When I'm installing 9ilite and when it comes to the mobile server repository screen, it get an error message :"ORA-12154 - TNS: could not resolve service name".
    But my service name pass the test of TNSPING.
    Please help me and any suggestion is greatly apprieciated.
    Thank you very much!
    Tonie

    Check your tnsnames.ora and make sure that webtogo.world tns entry is correct. The entry should refer to the
    correct database service name.

  • Ora 12154 error help needed

    Hi,
    I am a newbie in oracle forms. I have installed oracle database 10gr2 on windows xp in c directory. In D drive i have installed oracle developer suite 10g. When i try to connect database from developer suite i receive ORA 12154 error.
    Do i need to change tnsnames.ora in developer suites 'D' directory or in database'C' directory.
    Please explain me in steps so that i can configure developer suite.
    Thank You

    Forms will use its own Tnsnames.ora file so create alias for it
    Run NetCA from
    START > PROGRAMS > ORACLE - Oracle HOME name > Configuration and Migration tools > Net Configuration Assistant
    and create Alias for Local naming
    also make sure the Listener and Database is up and running
    Baig,
    [My Oracle Blog|http://baigsorcl.blogspot.com/]

  • Help to getrid off "ORA 12154 error"

    ??Why i am getting "DBMS Driver Exception was: java.sql.SQLException Error while trying to retrive text for error ORA-12154-(xyz/******@pqr)"

    You have to make sure you set the ORACLE_HOME environment variable.
    sree
    "M.N.Jagadeesh" <[email protected]> wrote in message
    news:3c457fc1$[email protected]..
    ??Why i am getting "DBMS Driver Exception was: java.sql.SQLException Error
    while trying to retrive text for error ORA-12154-(xyz/******@pqr)"

  • Gives ORA-12154 error, when trying to connect as sysdba

    Hi Gurus,
    I am new to oracle. I have successfully install Oracle Database 10gR2 on RHEL4.
    Everyghing is working fine.
    I found that loging through sqlplus not success as sysdba.(ORA-12154) But as a normal user I can loging through sqlplus. Anyway I can loging as sysdba through emctl console.
    Can anyone help on this pls. Urgent.......................

    You're welcome.
    I dont know how this happened Probably your old password had some special characters within it, that's why I wanted to know if connecting without password did work. Then I would have advised you to change your password (avoiding special characters...).

  • Error while trying to retrieve text for error ORA-12154

    Hello,
    I try to install php 5.1.2 on a WIN2003 server and IIS6 with the OCi8 extension without success from several days.
    On my server I've a 920 oracle client and the 10.1 instant client, I copy the tnsnames.ora in the instant client's directory.
    I've declare many environnement variables :
    - NLS_LANG : AMERICAN_AMERICA.WE8MSWIN1252
    - TNS_ADMIN : E:\...\oracle\instantclient_10_1
    - ORA_NLS33 : E:\..\oracle\920\ocommon\nls\ADMIN\DATA
    With the php command line the oci_connect function correctly works : the php command line use the instant client's tnsnames.ora. I can query with success my database.
    When I try to load a web php script (the same as the php command line script) I have the following error " Error while trying to retrieve text for error ORA-12154" ( oci_connect( $user , $pass, $sid ) . The $sid variable have the value of an alias declared in the tnsnames.ora.
    If I replace the sid's alias by something like this " (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xx.xx.xx.xx)(PORT=1521)))(CONNECT_DATA=(SID=xx)" in the oci_connect function, I have another error : Error while trying to retrieve text for error ORA-12705.
    A web page with the phpinfo function displays the following messages about oci8 extension : It seems to be correct.
    oci8
    OCI8 Support enabled
    Revision $Revision: 1.269.2.8 $
    Active Persistent Connections 0
    Active Connections 0
    Temporary Lob support enabled
    Collections support enabled
    Do you have any idea ? Thanks a lot

    The web server is not seeing the Oracle environment correctly. You need to set PATH to the instant client libraries. ORA_NLS33 is not used for Oracle 10g clients. Perhaps you have some library conflict with two versions of Oracle on the machine?
    These may help:
    http://www.oracle.com/technology/tech/php/htdocs/php_troubleshooting_faq.html#envvars
    http://blogs.oracle.com/opal/2006/05/01

  • Error while trying to retrieve text for errror ORA-12154

    Hi,
    I have an Oracle8 database installed and able to connect it from my Desktop running Windows 2000 Server.
    I have setup my PL/SQL developer ver 6 on my laptop running Windows XP Pro SP2 and the oracle client with Net8 service setup. Able to logon via sqlplus command.
    However, when i run the PL/SQL program and enter the logon info, it couldn't connect and prompt me this error.
    Thanks for your help in advance.
    Warmest regards,
    Tony Ang
    Singapore
    MSN: [email protected]

    Tony,
    Can you please post the error details that you are getting while connecting from PL/SQL developer.
    The error ORA-12154 is generaly TNS:could not resolve service name .
    Also perfrom these steps
    1)Verify that a tnsnames.ora file exists.
    2)Verify that there are not multiple copies of the tnsnames.ora file.
    3)In the tnsnames.ora file, verify that the net service name specified in your connect string is mapped to a connect descriptor.
    4)Verify that there are no duplicate copies of the sqlnet.ora file.
    5)If you are using domain names, verify that your sqlnet.ora file contains a NAMES.DEFAULT_DOMAIN parameter. If this parameter does not exist, you must specify the domain name in your connect string.
    6)If you are not using domain names, and this parameter exists, delete it or disable it by commenting it out.
    7)If you are connecting from a login dialog box, verify that you are not placing an "@" symbol before your connect net service name.
    Hope this helps.
    Thanks
    Rajeev

  • A question about CREATE PUBLIC DATABASE LINK and ORA-12154 error

    Dear all,
    I have a problem about public database link creation and I would appreciate if you could kindly give me a hand. I have the following connection parameters in my
    tnsnames.ora file:
    DGPAPROD.WORLD =
         (DESCRIPTION =
           (ADDRESS_LIST =
            (ADDRESS = (COMMUNITY=tcp.world)
              (PROTOCOL=TCP)(HOST=ORASR001)(PORT=1521)
           (CONNECT_DATA = (SID = DGPAPROD))
    ...Having the above mentioned parameters I can connect to this remote database directly in a SQL*Plus shell:
    $ sqlplus username/[email protected] works pretty well and the connection is established without any problem.
    Now, what I would like to do is to create a public database link to this remote database in order to avoid the user/connection switching for viewing the
    content of this database. I proceeded according to the syntax indicated in the Oracle online documentation:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_5005.htm#SQLRF01205
    Therefore I run the following in order to create a public database link
    CREATE PUBLIC DATABASE LINK SR001_dblink CONNECT TO user IDENTIFIED BY password USING 'DGPAPROD.WORLD';Apparently there is no error and the link is created successfully. However it cannot resolve the remote host and whenever I run the following query
    (myenterprise is the name of a table in that remote database)
    SELECT *
    FROM myenterprise@SR001_dblink
    ERROR at line 1:
    ORA-12154: TNS:could not resolve the connect identifier specifiedWhat causes this problem?
    Thanks in advance,
    Kind Regards,
    Dariyoosh

    spajdy wrote:
    You must have defined DGPAPROD.WORLD in tnsnames.oar on server where you DB is runnig.Hello there,
    Thanks a lot for this nice solution. In fact I had to add the connection parameters into the tnsnames.ora file of the server on which the link was created (not the tnsnames.ora of my oracle client stored on the localhost)
    After a bit googling I found another solution that allows to create the database link:
    CREATE PUBLIC DATABASE LINK SR001_dblink CONNECT TO user IDENTIFIED BY password USING '(DESCRIPTION =  (ADDRESS_LIST =  (ADDRESS = (COMMUNITY=tcp.world)
    (PROTOCOL=TCP)(HOST=ip_adresse)(PORT=1521)))(CONNECT_DATA = (SID = GPAPROD)))';Thanks a lot for your help!
    Kind Regards,
    Dariyoosh
    Edited by: dariyoosh on 18 nov. 2009 07:15

  • Php3 + oracle + apache - ORA-12154

    Hi,
    I build php3 with oracle support, installed oracle 8.1.5 on
    RedHat 6.0 and used dbassit and netasst to configure it.
    Oracle works fine. I can use sqlplus and read table from Acces.
    But, when I try to log on oracle with php3, it does not work :
    ORA-12154
    here what i try to run :
    <?php
    print "<HTML><PRE>";
    $db = "WWWITT";
    $c1 = ocilogon("scott","tiger",$db);
    ?>
    here my tnsnames.ora :
    WWWITT.ITTRALEE.IE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = apache)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = WWWITT)
    here my sqlnet.ora:
    TRACE_UNIQUE_CLIENT = on
    NAMES.DEFAULT_DOMAIN = ittralee.ie
    TRACE_LEVEL_CLIENT = USER
    TRACE_LEVEL_SERVER = USER
    SQLNET.EXPIRE_TIME = 0
    here my listener.ora :
    LISTENER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = apache)(PORT = 1521))
    (PROTOCOL_STACK =
    (PRESENTATION = TTC)
    (SESSION = NS)
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = orapache)
    (ORACLE_HOME = /opt/oracle/oracle8.1.5)
    (SID_NAME = WWWITT)
    TRACE_LEVEL_LISTENER = USER
    so what did i did wrong ?
    thanks, ronan
    null

    Hi,
    You may require ODBC access to your Oracle database; this can be
    provided by Openlink Software at http://www.openlinksw.com. We
    have many clients using PHP scripts on Linux/Unix to connect
    with Oracle running on remote servers (or the same machine).
    Good luck!
    Guest (guest) wrote:
    : Ok..I think I know what's the problem is. Ok, here are 2
    : scripts, working and NOT working:
    : NOT WORKING:
    : <? $conn = ocilogon("username", "password","DB"); ?>
    : Error: Warning: oci8_open_server: Error while trying to
    retrieve
    : text for error ORA-12154
    in /usr/local/apache/htdocs/oracle.php3
    : on line 4
    : WORKING: <? putenv("ORACLE_HOME=/path/to/oracle");
    : $conn = ocilogon("username","password","DB"); ?>
    : Works for me...!
    : Hope this will help!
    null

  • Windows 2003 R2 installation failing with ORA-12154

    Windows 2003 R2 Enterprise default installation, no Windows Updates at all
    Pentium 4, 2 gb ram, 127 gb hard drive
    In a workgroup using DHCP
    Installed Microsoft Loopback Adapter as per installation docs (which I read)
    Default installation of Oracle 10g R2 Enterprise, which installs a starter database.
    During the step Creating and starting Oracle instance with Clone database creation in progress at 46%, an error dialog appears:
    ORA-12154: TNS:could not resolve the connect identifier specified.
    The same problem occured when using a static IP address. About a year ago I followed the same steps with 2003 Enterprise (not the R2 version) and was successful. I also tried installing on XP Pro Service Pack 2 and failed at the same point.
    At this point I am completely unable to install Oracle 10g R2 on Windows using the default options. I even tried just installing Oracle without the starter database and then use DBCA to create a database. It failed to create a database.

    some more information
    I’ve just restarted the server with its full quota of 16GB of RAM and selected both boot.ini switches (/PAE and /3GB) at server startup. I then amended the dbblock_lru_latches parameter from 128 to 64. Before I even started the database I tried running ‘ipconfig /all’ at the command prompt with the following result:
    D:\Oracle>ipconfig /all
    Windows IP Configuration
    An internal error occurred: Insufficient system resources exist to complete the requested service.
    Please contact Microsoft Product Support Services for further help.
    is it windows causing these issues?
    rgds
    alan

  • 64-bit OCILogon() is fine, but 32-bit version always gives ORA-12154

    Hello,
    I am porting an application from Oracle 9.2 on Solaris 8 on Sparc to
    Oracle 10.2 on Solaris 10 on x64, using Sun C++ 5.8 on both.
    The Oracle installation was quite straightforward, and everything works fine, except that if I compile my app for 32-bit all I ever get from
    OCI is 'ORA-12154: TNS:could not resolve the connect identifier specified'
    sqlplus and tnsping, which are both 64-bit executables are also fine.
    Here is a little example program which writes a few BLOBs into
    an existing table:
    sun03%
    sun03% printenv
    HOME=/d0/sj
    SHELL=/bin/csh
    PATH=/usr/bin:/usr/ucb:/usr/bin:/etc:/usr/local/bin:/opt/csw/bin:/opt/sfw/bin:/u
    sr/dt/bin:/usr/ccs/bin:/usr/xpg4/bin:/opt/v11/SUNWspro/bin:/usr/openwin/bin:/usr
    /sbin:/usr/local/samba/bin:/opt/sfw/sbin:/usr/platform/sun4u/sbin:/usr/ccs/bin:/
    usr/sfw/bin:/d0/adam/Rational/releases/PurifyPlus.7.0/sun4_solaris2/bin:/usr/ORA
    /bin:/usr/sbin
    USER=sj
    PWD=/d0/sj/handover
    ORACLE_SID=oradev1
    ORACLE_HOME=/opt/oracle/product/10.2.0/db_1
    LD_LIBRARY_PATH=/usr/ORA/lib
    THREADS_FLAG=native
    LOGNAME=sj
    LIBPATH=/usr/ORA/lib:/usr/local/lib
    LANG=en_GB
    sun03%
    sun03%
    sun03% cat ora_prog1.h
    #define USERNAME "sj"
    #define PASSWORD "sj"
    #define ORASID "oradev1"
    #define NUM_OF_BLOBS 3
    #define BLOB_SIZE 32766
    sun03%
    sun03% cat ora_prog1.cpp
    #include <stdlib.h>
    #include <stdio.h>
    #include <assert.h>
    #include <oci.h>
    #include <oratypes.h>
    #include <string>
    #include "ora_prog1.h"
    using namespace std;
    #define OCI_CHECK(errhp, htype, status, OCIfunc) \
    do { if (OCI_SUCCESS != ((status) = (OCIfunc)))                                             \
    string msg = checkerr((dvoid *)(errhp), (ub4)(htype), (sword)(status), (text *)0, \
    (sb4)0, (text *)__FILE__, (sb4)__LINE__); \
    cleanup(msg); \
    } } while(0)
    // get the error from the DB
    void errprint(dvoid errhp, ub4 htype, sb4 errcodep,
    string& msg)
    text errbuf[512];
    if (errhp)
    sb4 errcode;
    if (errcodep == (sb4 *)0)
    errcodep = &errcode;
    (void) OCIErrorGet((dvoid *)errhp, (ub4) 1, (text *) NULL, errcodep,
    errbuf, (ub4) sizeof(errbuf), htype);
    char outBuffer[1024];
    (void) sprintf(outBuffer, "Error - %.*s\n", 512, errbuf);
    msg += outBuffer;
    // generate and return the appropriate error message
    string checkerr(dvoid errhp, ub4 htype, sword status, text note,
    sb4 code, text *file, sb4 line)
    string msg = "";
    // make sure that each print fits into this buffer
    char outBuffer[1024];
    sb4 errcode = 0;
    if (status != OCI_SUCCESS)
    (void) sprintf(outBuffer, "OCI Error %ld occurred at File %s:%ld\n",
    (long)status, (char *)file, (long)line);
    msg += outBuffer;
    if (note)
    (void) sprintf(outBuffer, "File %s:%ld (code=%ld) %s\n",
    (char *)file, (long)line, (long)code, (char *)note);
    msg += outBuffer;
    switch (status)
    case OCI_SUCCESS:
    break;
    case OCI_SUCCESS_WITH_INFO:
    (void) sprintf(outBuffer, "Error - OCI_SUCCESS_WITH_INFO\n");
    msg += outBuffer;
    errprint(errhp, htype, &errcode, msg);
    msg += outBuffer;
    break;
    case OCI_NEED_DATA:
    (void) sprintf(outBuffer, "Error - OCI_NEED_DATA\n");
    msg += outBuffer;
    break;
    case OCI_NO_DATA:
    (void) sprintf(outBuffer, "Error - OCI_NO_DATA\n");
    msg += outBuffer;
    break;
    case OCI_ERROR:
    errprint(errhp, htype, &errcode, msg);
    break;
    case OCI_INVALID_HANDLE:
    (void) sprintf(outBuffer, "Error - OCI_INVALID_HANDLE\n");
    msg += outBuffer;
    break;
    case OCI_STILL_EXECUTING:
    (void) sprintf(outBuffer, "Error - OCI_STILL_EXECUTE\n");
    msg += outBuffer;
    break;
    case OCI_CONTINUE:
    (void) sprintf(outBuffer, "Error - OCI_CONTINUE\n");
    msg += outBuffer;
    break;
    default:
    break;
    return msg;
    // Display info or fail
    void cleanup(string& msg)
    fprintf(stderr, "Oracle failed message:\n%s",
    msg.c_str());
    exit(1);
    int main()
    sword ociret;
    OCIEnv *envhp;                  // environment handle
    OCIError *errhp;                // error handle      
    OCISvcCtx *svchp;               // service context
    OCIStmt *stmthp;                // statement handle  
    OCILobLocator *lobLoc;
    OCIBind *bindp = 0;
    OCIDefine *defnp = 0;
    char stmt[1024];
    char data = (char )malloc(BLOB_SIZE);
    OCI_CHECK((dvoid *)0, (ub4)0, ociret,
    OCIEnvCreate(&envhp, OCI_DEFAULT, (dvoid *)0,
    0, 0, 0, (size_t)0, (dvoid **)0));
    OCI_CHECK(envhp, OCI_HTYPE_ENV, ociret,
    OCIHandleAlloc((dvoid *)envhp, (dvoid **)&errhp,
    OCI_HTYPE_ERROR, 0, (dvoid **) 0));
    // Create a handle for writing SQL statements - this is reused with various stmts
    OCI_CHECK(envhp, OCI_HTYPE_ENV, ociret,
    OCIHandleAlloc((dvoid *)envhp, (dvoid **)&stmthp,
    OCI_HTYPE_STMT, (size_t)0, (dvoid **)0));
    // Simplified logon for a single user session for one DB connection
    OCI_CHECK(errhp, OCI_HTYPE_ERROR, ociret,
    OCILogon(envhp, errhp, &svchp,
    (CONST OraText *)USERNAME, strlen(USERNAME),
    (CONST OraText *)PASSWORD, strlen(PASSWORD),
    (CONST OraText *)ORASID, strlen(ORASID)));
    // Allocate the LOB descriptors
    OCI_CHECK(envhp, OCI_HTYPE_ENV, ociret,
    OCIDescriptorAlloc((CONST dvoid *)envhp,
    (dvoid **)&lobLoc, OCI_DTYPE_LOB, 0, 0));
    for(int i = 0; i < NUM_OF_BLOBS; i++)
    memset(data, 'A'+i, BLOB_SIZE);
    sprintf(stmt, "INSERT INTO TEST_TABLE VALUES (%d, :1)", i);
    // Set the LOB to empty in order that it may be involved in an insert
    ub4 lobEmpty = 0;
    OCI_CHECK(errhp, OCI_HTYPE_ERROR, ociret,
    OCIAttrSet(lobLoc, OCI_DTYPE_LOB, &lobEmpty, 0,
    OCI_ATTR_LOBEMPTY, errhp));
    // Prepare to insert the empty LOBs
    OCI_CHECK(errhp, OCI_HTYPE_ERROR, ociret,
    OCIStmtPrepare(stmthp, errhp,
    (text *)stmt, (ub4)strlen(stmt),
    OCI_NTV_SYNTAX, OCI_DEFAULT));
    // Bind the BLOB to the parameter
    OCI_CHECK(errhp, OCI_HTYPE_ERROR, ociret,
    OCIBindByPos(stmthp, &bindp, errhp,
    (ub4)1, (dvoid *)&lobLoc, (sb4)-1,
    SQLT_BLOB, 0, 0, 0, 0, 0, OCI_DEFAULT));
    // Execute the statement
    OCI_CHECK(errhp, OCI_HTYPE_ERROR, ociret,
    OCIStmtExecute(svchp, stmthp, errhp,
    (ub4)1, (ub4)0,
    (CONST OCISnapshot *)NULL, (OCISnapshot *)NULL,
    OCI_DEFAULT));
    // Lock the row for update
    sprintf(stmt, "SELECT DATA FROM TEST_TABLE WHERE ID=%d FOR UPDATE", i);
    // Prepare a statement that will read the LOB
    OCI_CHECK(errhp, OCI_HTYPE_ERROR, ociret,
    OCIStmtPrepare(stmthp, errhp,
    (text *)stmt, (ub4)strlen(stmt),
    OCI_NTV_SYNTAX, OCI_DEFAULT));
    // Define space to hold the result of the query
    OCI_CHECK(errhp, OCI_HTYPE_ERROR, ociret,
    OCIDefineByPos(stmthp, &defnp, errhp,
    (ub4)1, &lobLoc, -1,
    SQLT_BLOB, 0, 0, 0, OCI_DEFAULT));
    // Execute the statement
    OCI_CHECK(errhp, OCI_HTYPE_ERROR, ociret,
    OCIStmtExecute(svchp, stmthp, errhp,
    (ub4)1, (ub4)0,
    (CONST OCISnapshot *)NULL, (OCISnapshot *)NULL,
    OCI_DEFAULT));
    ub4 expected_len = BLOB_SIZE;
    // Write data in one go
    OCI_CHECK(errhp, OCI_HTYPE_ERROR, ociret,
    OCILobWrite(svchp, errhp, lobLoc,
    &expected_len, (ub4)1,
    data, BLOB_SIZE, OCI_ONE_PIECE, 0, 0, 0, SQLCS_IMPLICIT));
    assert(expected_len == BLOB_SIZE);
    OCI_CHECK(errhp, OCI_HTYPE_ERROR, ociret,
    OCITransCommit(svchp, errhp, OCI_DEFAULT));
    // Cleanup by freeing the descriptor
    (void)OCIDescriptorFree(lobLoc, OCI_DTYPE_LOB);
    sun03%
    sun03%
    sun03% CC -xtarget=native64 -I/usr/ORA/rdbms/public -L/usr/ORA/lib -lclntsh -o ora_prog1 ora_prog1.cpp
    sun03% ora_prog1
    Compiled for 64-bit the program runs silently.
    But if I redirect my paths to the 32-bit libraries and
    recompile for 32-bit, OCILogon always fails:
    sun03%
    sun03%
    sun03% setenv LIBPATH /usr/ORA/lib32:/usr/local/lib
    sun03% setenv LD_LIBRARY_PATH /usr/ORA/lib32
    sun03% CC -I/usr/ORA/rdbms/public -L/usr/ORA/lib32 -lclntsh -o ora_prog1 ora_prog1.cpp
    sun03% ora_prog1
    Oracle failed message:
    OCI Error -1 occurred at File ora_prog1.cpp:143
    Error - ORA-12154: TNS:could not resolve the connect identifier specified
    sun03%
    Recompiling for 32-bit like this works fine on Oracle 9.2 on Solaris 8,
    so I have obviously missed something simple in my installation.
    Any help would be appreciated.
    Thanks
    -- Steve

    Hi prajithparan,
    I am facing the same problem on my Dual Core AMD running Solaris 11.06 x96-64. As long as I compile and link using the flag '-m64' everything work fine. But I use '-m32' or none getting 32 bit binaries I got the same error:
    'ORA-12154: TNS:could not resolve the connect identifier specified'
    even my LD_LIBRARY_PATH is set as below:
    echo $LD_LIBRARY_PATH
    /oracle/app/product/10.2.0/lib32
    Also I have to mention that SQLPLUS and TNSPING works fine on my side too. So I suppose that there is something wrong with trying to use 32 bit ORACLE libraries. Any idea?
    Please find attached my output (my APP is OCI / C based but not OCCI / C++):
    ./cdemouni user comext password noftnc dblink test stmt "select table_name from all_tables"
    option --user (-u) with value  comext
    option --password (-p) with value  noftnc
    option --dblink (-d) with value  test
    option --stmt (-s) with value  select table_name from all_tables
    OCIServerAttach( test -- 4 )
    FAILED: OCIServerAttach(), RC = -1
    Error [ OCI error 12154 ]- ORA-12154: TNS:could not resolve the connect identifier specified
    Regards,
    Ioan

Maybe you are looking for

  • Two different tax rates in same tax code

    hi, I have a client requirement as follows. A tax code is created for 12.5% cenvat. This tax code  is used by one company. Now the same tax code will be used by second company but in some of their transactions they want 5% cenvat and balance 7.5% to

  • Error Message When Importing Quicktime Screen Capture to FCE

    As I said in the subject I'm having issues importing a Quicktime Screen Capture into Final Cut Express. I keep getting this message. File Error: 1 file(s) recognized, 0 access denied, 1 unknown I figure it has to be a quick fix for this simple proble

  • Special characters being read from the unicode file for greek language

    Hi All, I have a report which would upload a unicode file and then update the vendor master data accordingly. The file contains greek characters too. when the file is being read in the code, some special characters are being added up to the vendor nu

  • Role VN

    Dear Sir, While iam making PO role VN does not exist warning mssg is appearing. i checked the partner function and also vendor master. both places VN are there can anyone tell me why this warning mssgs SK

  • QM-Inspection Lot Specification changes

    Dear Gurus, We have maintained some specifications in the inspection plan. during Delivery, Inprocess during process order relese Lot got generated with specifications maintained in the inspection plan. Now user finds a problem in the specification,