February 28, 2011 at 12:09 am
Experts,
SQL Server 2005 Express Edition.
Windows 2003
We have a proprietory application and SQL server express edition installed in a sever.
Whenever server is rebooted, there will be an SQL server error in the log of that application
saying "Login failed for user xxx for DB yyy". That particular user has got all the rights.
And this error is recorded only in reboot. Once the system is up everything works fine as expected.
Client is worried about this error and they assume that this causes someother problem as well
(Which I don't think so). But I need to give an explanation why this error occurs while rebooting.
I was confused since this user has got all the necessary rights and everything works fine otherwise.
But I had to give an explanation so I just assumed the following... Just assumed...
When server is rebooted, all the services including the application and sql server servies get restarted.
While restaring the application itself, it tries to connect to that particualr database.
Though SQL Server is up, that particular database is "NOT READY" for use.
(Becoz if SQL server is not started it would have given the error "SQL server does not exist")
But I realy don't know my assumption was correct or not, this is what came in my mind while discussing with client.
Is it possible to happen that way ?
Has anyone come across such an issue.? Kindly help me to identify and rectify this please.
Thanks in advance.
San.
February 28, 2011 at 10:16 am
Yeah, I've seen it before on reboot with a custom service I built many years ago that seemed to connect too quickly.
Is this a service? If so, try auto delay start. Of course, I don't know what the problem in the software is... but depending on how its built, this could temporarily cause an issue or completely fail it. Yet, if you see successful connections after this error, well... I guess you can scratch that out.
February 28, 2011 at 2:02 pm
Once the SQL Server Service has started, it is technically able to accept connections, but it takes a few seconds to attache the databases and make them available. This means if you have an application that is running and trying to connect to a specific database it will give this error from the time SQL is up and running until the specific database is available. This is nothing to worry about, although a bit irritating. Ideally you would like to bring your databases up and then start the application, which would resolve the issue.
Personally if the app is always live I some would tend to think of this as bad design, but I know there are a number of situations where this will almost always happen.
You can assure the client this is "normal" for the application and simply a result of the SQL Restart process and the application trying to connect befor the databse is ready.
Cheer
Leo
Leo
Nothing in life is ever so complicated that with a little work it can't be made more complicated.
February 28, 2011 at 4:00 pm
Just to add to the reassurance this is perfectly normally behavior and I have seen it many times, especially if the application runs as a service.
Sql is just not ready to accept connections when the application tries to connect. It is probably happening when the server comes down as well ad when it comes up.
---------------------------------------------------------------------
March 1, 2011 at 5:19 am
Thank you very much experts.
So ultimately whats I assumed was right I believe.
Thanks a ton once again.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply