Connect to server always drops

Need help, I have noticed that whenever we have power cuts the client PC always loses connection string settings to the server and has to be reconnected manually.
Any ideas of a permanent solution while we work on getting UPS.

It should not lose settings. You should be able to just restart the client after the server is back online. What version are you using?

I have 5.36 installed on one site and 5.72 on another. Both behave the same

@Jesse I can confirm, happens on all version both pre and post 5.5.0.

You surenits not just that sql machine takes longer to get back up and running and client trying to connect before sql is back up?
This would be almost expected and client machine would show connection error at first.
Be sure that someone isnt changing or clearing connection string not understanding this trying to reconnect.

Are there any errors/exceptions in the log you can share with us?

I do not quite understand why it would erase or edit the settings file. I do not think we have code that does that. Are you sure the settings file is being deleted or changed?

We have seen many times where this happens and after the server is online fully the clients just reconnect when they are booted up.

You should always make sure the server is fully online before you restart the client terminals. That includes sql server is running.

The settings for this are stored in a txt file. It seems odd to me that a power outage would erase or alter that file.

Will upload this text file for your review.

At times yes it’s that the client came on faster. Other times the clients pc will be working fine but the Server itself will lose the connection settings.
I have brought it up now because of the Power issues we are experiencing in Zambia.

I’m with you - settings are saved on start (e.g. one passes a connection string via command line args, that gets saved) and on exit. I don’t think there’s a way to alter the connection string outside of management->local settings or the file itself.

I’m inclined to think it’s going to be some sort of SqlException maybe with an error code 40: Could not open a connection to SQL Server.

I think we have terminology difference. It’s not dropping the settings but the SQL server is not started so it can’t connect.

@Jesse

I was agreeing with you

1 Like