OCILogon2 fails to logon even though SQL*Plus succeeds

I have a problem with the following code in Oracle 10g r1:
CheckError(p_err,OCILogon2(p_env, p_err, &p_svc,
(CONST OraText *)"username01", (ub4)10,
(CONST OraText *)"password", (ub4)8,
(CONST OraText *)sServer, (ub4)15, OCI_DEFAULT));
OCILogon2 is returning -1 and OCIErrorGet called on p_err gives:
ORA-12154: TNS:could not resolve the connect identifier specified
Oddly, when I try to call SQL*Plus and login with the same user name, same password, and same server, SQL*Plus logs on properly.
And this happens on my computer only, not on other computers.
Is there a cause I should be looking for?
-- Darren --

Apparently the following did the trick:
1. Uninstall the Oracle Client following the instructions at:
http://www.oracle-base.com/articles/misc/ManualOracleUninstall.php
(I'm running Windows XP).
2. Reinstall the Instant Client (I used version 10.1.0.5).
3. Set the TNS_ADMIN and SQLPATH and PATH environment variables.
-- Darren --

Similar Messages

  • Messaging Server 3.6 fails to start even though the Administration Server says "Success"

    Messaging Server 3.6 fails to start even though the Administration Server says
    "Success". There are no entries in the log to help explain what has happened.
    <P>
    Any failure to start Messaging Server via Administration should be analyzed by
    starting the server with /etc/NscpMail.
    <P>
    # /etc/NscpMail start
    19991219004527:Dispatch:Notification:Network Module (IMAP4-Server) Failed the verify environment test.
    Module not Loaded.
    Startup Problem:
    Problem Gaining Unique Lock
    Netscape Messaging Server Exiting!
    <P>
    This error is caused by an inability to create the .netscape.mailID file
    inside the top level of the postoffice.
    <P>
    # cd /var/spool/postoffice
    # ls -la
    total 30
    dr-x------ 8 nobody nobody 512 Dec 19 01:06 .
    drwxrwxr-x 13 root bin 512 Feb 12 1999 ..
    drwx------ 2 nobody nobody 1536 Dec 19 01:04 config
    drwx------ 2 nobody nobody 512 Dec 19 01:04 control
    drwx------ 3 nobody nobody 512 Dec 19 01:04 deferred
    drwx------ 2 nobody nobody 512 Dec 19 01:04 hold
    drwx------ 2 nobody nobody 5120 Dec 19 01:04 log
    drwx------ 2 nobody nobody 512 Dec 19 01:04 messages
    -rw-r--r-- 1 root other 183 Apr 12 1999 sie.conf
    -rw-r--r-- 1 root other 6 Dec 19 01:04 socket.dat
    <P>
    NOTE: The "." entry is the same as ls -l /var/spool/postoffice
    <P>
    # chmod u+w .
    # /etc/NscpMail start
    # ls -la
    total 32
    drwx------ 8 nobody nobody 512 Dec 19 01:04 .
    drwxrwxr-x 13 root bin 512 Feb 12 1999 ..
    -rw------- 1 nobody nobody 5 Dec 19 01:04 .netscape.mailID
    drwx------ 2 nobody nobody 1536 Dec 19 01:04 config
    drwx------ 2 nobody nobody 512 Dec 19 01:04 control
    drwx------ 3 nobody nobody 512 Dec 19 01:04 deferred
    drwx------ 2 nobody nobody 512 Dec 19 01:04 hold
    drwx------ 2 nobody nobody 5120 Dec 19 01:04 log
    drwx------ 2 nobody nobody 512 Dec 19 01:04 messages
    -rw-r--r-- 1 root other 183 Apr 12 1999 sie.conf
    -rw-r--r-- 1 root other 6 Dec 19 01:04 socket.dat

    Hi,
    Please check if you have disabled the autodisconnect feature of the Server service. On Windows servers it can be configured through the Autodisconnect registry key.
    \HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\
    CIFS and SMB Timeouts in Windows
    http://blogs.msdn.com/b/openspecification/archive/2013/03/19/cifs-and-smb-timeouts-in-windows.aspx
    Based on the research, as the open shared folder is in a SMB session, the default timeout for SMB session is 15 minutes. If the SMB session is inactive for 15 minutes the server will send a TCP reset to close the SMB connection. Until the
    Autodisconnect timer is reached, the server will send an NBT keep-alive packet every two minutes. If a client or server application is not written to properly handle network delays, it may terminate the session prior to the default timeout
    period.
    For more detailed information, please refer to the thread below:
    Session doesn't close Shared Folder
    https://social.technet.microsoft.com/Forums/en-US/54f658c8-3d41-4beb-9a2f-47b054a11b7a/session-doesnt-close-shared-folder?forum=smallbusinessserver
    Regards,
    Mandy
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Charged for failed self install even though it was outside cable issue

    Recently I moved and opted for self-install. I did all the set up correctly on my end but was still not getting internet service. I called and a technician was sent out and the technician also couldn't set it up because he determined the issue was with the outside line. He told me another technician would need to come out, at no charge to me, to run a new wire into the apartment for me to get service. The second technician came out a week later and did the work and again, no mention of charges for services was given or indicated on the receipt I was left with and signed. Sure enough I check my bill this month and there is a failed self-install fee of $100! I talked to customer service in chat and they said the best they could do is $30 even though I was told I would NOT be charged for the 2nd technician. I was also told that $50 service charges are mandatory whenever someone comes out, even though this specific charge is for a bogus failed self-install and not for a generic service visit. It wouldn't be so much of an issue if the first technician had just said "by the way it will cost $100 for the 2nd technician to install the new wiring from the cable box" instead of telling me it would be free. Why can't the technicians and service reps just be up front from the begining? This has been very frustrating. I still don't see the $30 credit and I should be getting a FULL credit because charge is completely bogus and the technicians should be trained to explain in advance all fees for services 
    BEFORE I authorize service.

    @rick_a_shae
    I am sorry for your troubles. I have sent you a private message to assist you further.

  • Answers report displaying 0s even though SQL returns data from sqlplus

    OBIEE 10.1.3.3.3
    I created a few measures in the RPD and when I run a report against them I get all zeros. I pulled the query from the session log and I ran it from SQL Plus and found that the query generated by BI Server was actually returning data (numbers other than zeros) from the SQL plus prompt.
    However for some reason those numbers are not being displayed in Answers.
    The report is a simple one with name and count as 2 columns. The count column is showing all zeros.
    When I put a filter on the report on the name column, i do get a record without the zero.
    Can someone let me know if I am missing something ?
    Edited by: qqq on Sep 9, 2009 9:50 AM

    I dont think so i understood the problem.
    Can you copy paste the query here so we would understand the problem and exactly whats going wrong?
    You are saying count column.count() of what are you taking??And whats the filter your applying??

  • Boot Disk Failed to load even though I've delted Windows Partition?!

    Hi All,
    I had a few problems installing Windows (mainly not being able to eject the CD during installation...) and decided to wait a while until I purchase Vista. I've deleted the partition through Disk Utility, and it now shows that it's not there.
    However, when I start up my Mac, I'm faced with a screen saying "Boot Disk failed to load, press any key to restart."
    I can get into my Mac by holding down the Alt Key, but don't really wanna do that every time I turn it on!
    Does anyone have any suggestions?
    Happy New Year!
    Simon.

    Check System Preferences > Startup Disk and make sure it is set to Mac OS. See http://docs.info.apple.com/article.html?path=Mac/10.5/en/8240.html

  • TS1702 an app. i have purchased has failed to download, even though i have received email confirming the purchase.

    i have tried several times unsuccessfully to report a download failure {app}. the amount was deducted from my account, and i have received an email confirmation.

    Keith I've had very good luck with iTunes billing support.  Never had a failed app download, jujst a failed HD movie download....but they were good about issuing a refund. 
    http://www.apple.com/support/itunes/
    Follow the Apple ID Support link.

  • ITunes fail to install even though it says "Congratulations, iTunes has downloaded".

    Basically, I fired up my iTunes and it says I needed to update it to 11.1.4, and I did that when suddenly it couldn't be updated stating that there is a problem with the Apple Mobile Device Support thingy. I tried to Google several solutions for that but decided to uninstall iTunes.
    When I've downloaded the new .exe file and follow through all the steps to re-install it, it says "Congratulations, iTunes has downloaded" at the end of the process but when I search on my desktop or on the menu, iTunes does not appear, which means it is not installed.
    I've tried this probably about 5 times.
    I've Googled solutions to this and these came up:
    1. https://discussions.apple.com/message/19918962#19918962
    2. https://discussions.apple.com/thread/5720701?tstart=0
    In those discussions, the solutions were to either download it with a different browser or download it from a different website. I tried both and it result in the same. I have also tried restarting my computer.
    I'm running on a 32-bit Vista.
    PLEASE HELP ASAP! Because now I do not have any iTunes and I can't sync in my iPhone!

    Valiant1:
    I had same problem. I have Just sorted it by the following :- 1) uninstalling Itunes
    2) uninstalling all Apple software (Safari, mobile, Quicktime) EXECPT ICloud and Apple Software Updater
    3) Then run Software updater and reinstalled Quicktime and Itunes (Apple Software Updater should be separate from Itunes & Quicktime 11.1.4 now sucessfully installed.
     My best guess is that there's an issue with the new Itunes update and Quicktime !! Hope this helps  (I'm running on 64bit Vista)
    Valiant1, you're my hero!
    Thank you! That worked perfectly!
    *Internet hug*
    PS: I accidentally rated you as "This helped me" instead of "This solved my question". Apologies!

  • HT4623 The update function on the App Store fails to load, even though it indicates apps require updating.

    I have connected my device to the Internet, updated iTunes and downloaded a software update that initially seemed to cure the problem, however, same thing has happened again. Any advice please?

    This morning I checked my iPhone and the app store said I had updates again.  Maybe it's just a 24 hour bug.

  • Can't search Active Directory contacts even though domain binding succeeded

    My machine is bound to an Exchange 2003 AD server correctly but I can't search contacts from address book or Mail. In neither case do I see anything to indicate that I even should be able to search. What am I missing? Two colleagues are running 10.5 and they both see a "Directory" entry in their address book.
    Thanks,
    Simon

    bump

  • What is SQL Plus trying to connect to? I don't have a database on my machine.

    Strange because I don't know what I'm doing.  I have a Linux box.  It has a fresh install of 11gR2 for learning.  I'm now on my Windows machine.  I thought I could connect to the Linux machine.  On the Windows machine when I start SQL Plus it is asking for a username and password.
    Why is it doing this? I'm not connected to anything that I know of.  There is a production site and I have tnsnames.ora for other things like ODBC, JDBC, etc. but I've never even used SQL Plus on this machine (Windows).  Thanks for help.
    It is from instant client 11.2.

    user5381503 wrote:
    Ok.  Thanks.  I'm trying to locate the manual so I don't ask any more stupid questions.
    In addition to the official docs at docs.oracle.com, you might find the following enlightening for your current issue:
    see: http://edstevensdba.wordpress.com/2011/02/09/sqlnet_overview/  (Help! I can’t connect to my database  )
    see: http://edstevensdba.wordpress.com/2011/02/16/sqlnet_client_cfg/  ( Help! I can’t connect to my database (part duex) )

  • Package fails, execute in sql*plus works

    SQL> execute toa.toa_security.change_password('testuser','testpassword');
    ALTER USER testuser IDENTIFIED BY testpassword
    BEGIN toa.toa_security.change_password('testuser','testpassword'); END;
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "TOA.TOA_SECURITY", line 77
    ORA-06512: at line 1
    Here is the code
    PROCEDURE CHANGE_PASSWORD (userid VARCHAR2, passwd VARCHAR2) IS
      sqlstr VARCHAR2(500);
    BEGIN
      sqlstr :=
        'ALTER USER '||userid||' IDENTIFIED BY '||passwd;
      EXECUTE IMMEDIATE sqlstr;
    END CHANGE_PASSWORD;Line 77: EXECUTE IMMEDIATE sqlstr;
    No matter what user I run this as it fails (even the owner who has DBA priv). I have other procedures and functions in this package and they all run fine for the owner and a "simple" user. So obvioulsy it is not a privilege missing for the user on the package even though I did "grant execute on toa_security to <user>;".
    I'm stumpped and baffled. And, I'm probably blind as to what is wrong.
    Any ideas?

    What William Robertson said is correct. Here's what happened on my system, I had to grant ALTER USER to myself directly:
    SQL> show user
    USER is "SYSTEM"
    SQL> CREATE OR REPLACE
      2  PROCEDURE CHANGE_PASSWORD (userid VARCHAR2, passwd VARCHAR2) IS
      3
      4  BEGIN
      5
      6    EXECUTE IMMEDIATE 'ALTER USER '||userid||' IDENTIFIED BY '||passwd;
      7
      8  END CHANGE_PASSWORD;
      9  /
    Procedure created.
    SQL> exec change_password('HR','blah');
    BEGIN change_password('HR','blah'); END;
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "SYSTEM.CHANGE_PASSWORD", line 5
    ORA-06512: at line 1
    SQL> grant alter user to system;
    Grant succeeded.
    SQL> exec change_password('HR','blah');
    PL/SQL procedure successfully completed.
    SQL> conn hr/blah
    Connected.
    SQL>

  • TS3274 I am trying to do a software update on my ipad third generation...even though i am connected to the internet, i get a message saying "iso 6 failed verification because you are no longer connected to the internet"

    I am trying to update my software on my ipad 3rd generation...Even though I am connected to the internet, I get and error message saying, "iso 6 failed verification because you are no longer connected to the internet"  Can anyone help?

    Connect to iTunes on the computer you usually Sync with and “ Check for Updates “...
    See the Using iTunes Section Here...
    How to update your iPhone, iPad, or iPod touch

  • I am trying to upload files to an Apple hosted feed on KSU iTunes U (unpublished site). The file size shows as 2 GB even though the files are 50MB. The upload stalls and fails. Address:

    I am trying to upload files to an Apple hosted feed on KSU iTunes U (unpublished site). The file size in the Feed Editor shows as 2 GB even though the files are 50MB. I am using Safari on Intel Mac 10.5.8. at Kennesaw State University. Any help would be appreciated.

    This is the second day. I tried using a new Apple feed to test. Still not working. I uploaded a 50MB mp3 file. The first time the upload failed. The second time the file showed that it was uploading a 2 GB file. It has been about 20 minutes now and shows "3.5GB of 2.0GB 178% Completed". Now it has started uploading all over again - it is now showing 399.4MB or 2.0 GB - 19% Completed. I dont know if this will keep looping - but I am going to Cancel.
    Please let me know what other information do you need from me. Definitely need some help with this!

  • SQL*Plus logon attempt counter

    Hi,
    I would like to use SQL*Plus to run some script agains DB. And I want to run it through script.
    So, I can set following parameters for sqlplus: logon and SQL-script name.
    But I have a problem how to check that this SQL has been run. For example DB is staying in RESTRICTED mode. Command:
    sqlplus user/password@db @test.sql
    will return ORA-01035: "ORACLE only available to users with RESTRICTED SESSION privelege" and will wait for second attempt to connect.
    But it is not possible to do it from script.
    Any ideas how to disable 3 attempts to connect and check EXIT ERROR CODE?
    Thanks a lot,
    Boris

    1. you're not using pl*sql to connect. you're using SQLPLUS to connect.
    2. ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect descriptor
    so, verizon changed something, perhaps the "windows\system32\drivers\etc\hosts" file, so that now your TNSNAMES.ORA has the wrong info. check tnsnames.ora, and see if it's using machine name, IP, or "localhost", then give the new, correct info.

  • AND Process failing even though its prior processes are green

    Hi Experts,
              I have an issue with AND process .The AND process is failing even though its prior processes have finished sucessfully and have become green in the  process chain.
    Can any one please help out on this issue.
    Thanks
    SHASHI

    Hi........
    U copy the rest of the chain.........
    Open the chain through RSPC1...........it will directly open the chain in Planning view.........bcoz to copy a chain u hav to open the chain in Planning view.......in the top where we write tcode.............write COPY there.........or ......in the top Process chain tab >> Copy.........Give the chain name..............remove all the processse till the AND process...........remember remove the Start process also...since Start proces is always unique..........and set the the condition as immediate.........then schedule the chain.........
    And to fix the issue permanently...........deschedule the chain..and then again schedule it back......
    Regards,
    Debjani......

Maybe you are looking for