Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 181391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:45:19+00:00 2026-05-11T14:45:19+00:00

I have moved a component of our application from a webservice to a Windows

  • 0

I have moved a component of our application from a webservice to a Windows Service. It connects to oracle perfectly from the webservice but refuses to see the Tns names from the Windows service. I have given full control to the ORAHOME dir to the account the service is running under.

I have also checked the service account permission to the registry by using runas regedit as the service account and it can see HKLM\SOFTWARE\ORACLE\HOME0 details and HKLM\SOFTWARE\ORACLE\ALL_HOMES. All the ORACLE_HOME keys are pointing to the same directory.

I can log in as the service account and TNSPing the sid ‘UAT’ with no problems:

'OK (70 msec)'

I have attached process monitor to the process and the service account is (finally after scanning most of the registry) seeing the tnsnames.ora and even reads it.

Are you chuckling behind your keyboard? Can you help!

Cause: OracleException

Source: System.Data.OracleClient Message: ORA-12154: TNS:could not resolve service name at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OracleClient.OracleConnection.Open()

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T14:45:20+00:00Added an answer on May 11, 2026 at 2:45 pm

    First you can change the connection string to expand out the tns entry:

    Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.161.50.101)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=MOUAT)));Password=password;User Id=username;

    Then you get the real error:

    And got ‘ORA-06413: Connection not open.’

    Which was due to the ‘Windows Service’ path having brackets in it ‘(DEV)’ or ‘(UAT)’

    ANSWER: Expand out the connection string to exclude the TNS resolution and then make sure that the path to the calling application does not contain brackets ‘(‘ or ‘)’.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

we have moved our own scripts to bbcode. But on google maps there is
I have moved my iPhone app from one machine to another. In the process
I have moved my classes from a global namespace into a specific namespace. I
At some point I must have moved files from one location to another using
We have recently moved some data from an SQL Database instance to another one
I have just moved a site from a dedicated server to a GoDaddy shared
We have a multi services application. We have moved a method that involves a
(EXT 3) I have moved from an hbox layout to a border layout. All
We have a WinForms application written in C# that uses the AxAcroPDFLib.AxAcroPDF component to
I have a Java Swing application that i want to create a nice component

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.