1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

TNS-12560 error when running as Windows Service

Discussion in 'General' started by vgmello, Sep 7, 2009.

  1. vgmello

    vgmello Active Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    55
    Hello,

    I created a VB.NET application that connects to a Oracle database using DbProviderFactory and ODP.NET for .Net Framework 2.0. This application runs on XP, I need it to run as Windows Service, but every time it try to connect to the database throw the Oracle exception TNS-12560: TNS:protocol adapter error, the weird thing is the same application running as a Console Application it works (Same code, same connection string, same query). It was using ODP.NET 10 I updated the provider to 11 still got the same error. The service is running user Local System account, and it has the same problem running under other adm account.

    Following is error in the sqlnet.log (PS: The file was under the system32 folder, probably because was running as a service):

    Code (Text):
    Fatal NI connect error 12560, connecting to:
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=XX.XX.XX.XX)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XXX)(CID=(PROGRAM=C:\Program Files\MyApp\MyApp.exe)(HOST=MYCOMPUTER)(USER=MYUSER))))

    VERSION INFORMATION:
    + TNS for 32-bit Windows: Version 10.2.0.1.0 - Production+
    + Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 10.2.0.1.0 - Production+
    Time: 28-AUG-2009 02:20:19
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12560
    TNS-12560: TNS:protocol adapter error
    ns secondary err code: 0
    nt main err code: 530
    TNS-00530: Protocol adapter error
    nt secondary err code: 56
    nt OS err code: 0
    Does anyone have any thoughts as to why I'm getting this error ??

    Thanks
     
  2. mirza

    mirza Active Member

    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    80

    Reconfig you listener...
     
  3. vgmello

    vgmello Active Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    55
    That is not possible, is not my server, but why should I do that, something is not setup right ?
     
  4. mirza

    mirza Active Member

    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    80
    Once we have got the same error.
    After reconfiguring , the issue was resolved.