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 8820403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:35:58+00:00 2026-06-14T05:35:58+00:00

I am writing a service in VB.NET to continually log data to an Oracle

  • 0

I am writing a service in VB.NET to continually log data to an Oracle DB using ODP.NET

The application was originally written as a basic Windows Forms App and works however when I port it to a service it seems it cannot see the TNS file and the following error message is thrown:

Service cannot be started. Oracle.DataAccess.Client.OracleException
ORA-12154:TNS:could not resolve the connect identifier specified    

So when using the following example connectstring

"Data Source= example;User Id= user;Password=password;"

I get ORA-12154

If I provide the full TNS entry directly to the app e.g

"Data Source= (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = EXAMPLE)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = EXAMPLE) ) );User Id= user;Password=password;"

Then it works but when I originally developed the app as a Forms Application it worked either way.

I assumed maybe the environment variables were not set up correctly but I have added the required system variables (ORACLE_HOME / TNS_ADMIN / added the oracle folder to PATH) and it doesnt work.

The path the service is being run/was installed from does not contain parentheses, I have checked the process with process monitor and it looks like it is being started up with the correct environment variables (ORACLE_HOME / TNS_ADMIN / PATH are all there and correct). The machine being used for testing is running Win XP

What am I missing here?

Thanks

  • 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. Editorial Team
    Editorial Team
    2026-06-14T05:35:59+00:00Added an answer on June 14, 2026 at 5:35 am

    I suspect that the user that the service runs as will need file system permission to the entire oracle directory tree. This feels like a permissions problem, since it can’t resolve the connect identifier, but works if it doesn’t need to.

    Try adding read permission to the entire oracle client directory for whatever user that the service is running as.

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

Sidebar

Related Questions

Yes Vista sucks... I'm writing a Windows Service using .Net but getting security errors
I'm writing a Windows Service using C# .NET 2005. How can I determine who
I am writing a WCF Service Application in Visual Studio 2010 using .NET Framework
Am writing a .net windows service using which i need to parse an xml
I'm writing in .NET a windows service that, at windows startup, executes some network
I'm currently writing a web service using WCF in VB.NET. Previous web services I
I'm writing a windows service that's required to retrieve data from a database, build
I'm writing a web service (using ASP.NET MVC) and for support purposes we'd like
I'm writing an ASP.NET web service using C# that has a DoLookup() function. For
I'm writing Qt client for ASP.NET web service with FORMS based authentication. The service

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.