August 4, 2011 at 2:21 am
Dear SQL-Friends
Is there anyways when sql server gets restart it automaticaly need to get connected with application again
Syed Sami Ur Rehman
SQL-DBA
Creative Technosoft System | www.cts-in.com
August 4, 2011 at 5:24 am
Connections come from the application, so that's where the code for reconnecting would have to reside.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
August 4, 2011 at 5:26 am
August 4, 2011 at 11:20 pm
Thanks (Grant Fritchey,Jayanth_Kurup)
Its clear that it cant be done using any query or using SSMS rite !
Thanks for that information, Would i asked you just a small help in this matter
can you please let me know a basic idea how this can be done via application if you can provide me this details it will be a great favour on me....
If not never mind thanks for your time guys... 🙂
Syed Sami Ur Rehman
SQL-DBA
Creative Technosoft System | www.cts-in.com
August 5, 2011 at 3:07 am
Am not sure if this is what your looking for , but most case the connection would have something like
dbconn.Open()
and
dbconn.close()
if an error is thrown due the the db being offline then the next time the code is exceuted it runs dbconn.open anyway. so the connection is initiated newly.
A bad practice is to open a single db connection and leave it open for multiple DB calls.
Also If you cache your connections sometimes an IIS reset is required , but this is dependent on the application.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply