5

I have an app, it's done and working, but the users report a small problem with it, and quite frankly i susspected it could be a problem. As the title says the app is written in c# (.net 3.5) and it's using SQL DB. The "problem" is - when the app is first started, it takes about a half a minute to conenct to database.

Could this be somehow reduced?

Thank you for your time!

EDIT1: the DB is local.. sql server and .net framework are installed at the same time as the app

EDIT2: when the app is stared it all works fine, and when users open the winform where some DB work needs to be done, the first time it's started they have to wait about half a minute, after that it works fine..

6
  • 1
    Is that perhaps doing an auto-start on the underlying database? Commented Feb 16, 2011 at 9:28
  • 1
    Is the database local or remote? Commented Feb 16, 2011 at 9:30
  • Ok, and has this 'first execution' always taken place immediately after an install? Commented Feb 16, 2011 at 9:45
  • not necessarily.. there's alway the delay when the program is first started after turning the computer on Commented Feb 16, 2011 at 10:03
  • If you start the program, run it once, close it and start it again, do you get another delay or does it work instantly? Commented Feb 16, 2011 at 10:52

1 Answer 1

4

From questions I asked in comments and their respective answers, the conclusion I offer is this:

It seems to me that the server agent service may be set with a startup mode of Manual. This means the service will only start as and when required by an application:

Manual starts a service as required or when called from an application (according to definition, but only some of the time in practice, depending on the service)

To mitigate this you could create a custom install action which would, as part of your product installation, set this startup mode to Automatic - this would cause the service to start when Windows starts.

Sign up to request clarification or add additional context in comments.

3 Comments

insteresting, now off to find a way to enable this during silent install and i'm good to go... tnx!
there it is.. /AGTSVCSTARTUPTYPE needs to be set on "Automatic" .. tnx for the anwser once more!
Any time. Glad you're sorted. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.