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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:36:51+00:00 2026-05-22T16:36:51+00:00

I have developed a Windows Service, that must start automatically during Windows startup. This

  • 0

I have developed a Windows Service, that must start automatically during Windows startup. This service connects to an Oracle db, so I made my service dependent on Oracle Services by sc command line utility:
sc config MyService depend= OracleServiceXE/OracleXETNSListener

So far so good, dependency was set succesfully. But when Windows starting, my service could not start, I get the following (Oracle) error message: “ORA-12528: TNS:listener: all appropriate instances are blocking new connections”.

As I think, the Oracle services are started when my service starts, but they are not ‘fully initialized’. After some seconds I can start my service from service consol without any problem.

So, how can I start automatically my service at Windows Startup which is dependent on an Oracle DB connection?

My service was developed in C# on .Net 4 platform, in VS 2010 environment.

Pls. help me, it is a really important task form me!

  • 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-05-22T16:36:52+00:00Added an answer on May 22, 2026 at 4:36 pm

    Remember, the code for your service’s startup should do as little as possible. In other words, don’t have your service startup check for availability of the Oracle server, or indeed do anything. Have your service do the following:

    • Log the fact that it’s started
    • Load any applicable configuration from config files/registry/etc
    • Spin-up a thread that will try and “startup” the service properly every N seconds, and will repeat M times until it gives up. Have N and M configurable from your config file/registry

    Have the thread “try” to connect to the applicable Oracle server and if it fails, go to sleep for N seconds, and do this M times. If it succeeds it can then start doing the “meat” of what it’s supposed to.

    Ironically, it’s probably the fact that the Oracle service does something similar to what I’ve proposed you do that’s causing you the problem. By returning “Yes, I’ve started” quickly back to Windows when it’s started, it allows your service to then be loaded, even though Oracle is still busy spinning stuff up. Ideally in this scenario rather than rejecting your requests, Oracle should enqueue them for processing when it is ready.

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

Sidebar

Related Questions

I have a very simple windows Service that is developed in vb.net 2008. When
I have a windows application that acts as a WCF Service that I developed
I have developed a .NET Windows Service (in VS2010) that needs to: Access shared
I have developed an app that runs as a windows service and regularly does
Greetings! I have developed a Windows Service that seems to install just fine most
I have developed an ASP.NET application that includes a WCF service. This service needs
I have a windows service that loads multiple handlers written by different developers. The
I have developed a Windows service using Visual Studio 2008. I want to install
I have a simple windows Service developed in VS.net 2008 and VB.net. When I
I have a .net Windows Service developed in VB.net. I have a settings file

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.