H
HiChetu
hi All,
Connection Pool - Does not check for Server Status.
Here is the scenario :
1) SQL Server is up
2) Create a connection pool for a particular connection string by
repeatedly executing the same query in .NET ( using SqlConnection and
SqlCommand classes )
This involves following steps
- Open a connection
- Execute a Query
- Close the connection
3) STOP the SQL Server.
4) Run the same query again.
We notice that
- Opening a Connection goes through fine. If the pool was not
formed ( if we are opening the connection for the first time ), this
would have FAILED by throwing SQL Server not found execption.
- Execute Query , Throws an Exception - General Network Error,
Error Number 11.
5) Now RE-START the SQL Server.
6) Run the same query again.
We notice that
- Opening a Connection goes through fine.
BUT, - Execute Query , Throws an Exception - General Network
Error, Error Number 11.
An Exception is thrown even if SQL Server is UP!
Once the Server is up, we want the connection to succeed.
Now, How do we handle this scenario?
How do we invalidate the Connection Pool?
thanks,
HiChetu
Connection Pool - Does not check for Server Status.
Here is the scenario :
1) SQL Server is up
2) Create a connection pool for a particular connection string by
repeatedly executing the same query in .NET ( using SqlConnection and
SqlCommand classes )
This involves following steps
- Open a connection
- Execute a Query
- Close the connection
3) STOP the SQL Server.
4) Run the same query again.
We notice that
- Opening a Connection goes through fine. If the pool was not
formed ( if we are opening the connection for the first time ), this
would have FAILED by throwing SQL Server not found execption.
- Execute Query , Throws an Exception - General Network Error,
Error Number 11.
5) Now RE-START the SQL Server.
6) Run the same query again.
We notice that
- Opening a Connection goes through fine.
BUT, - Execute Query , Throws an Exception - General Network
Error, Error Number 11.
An Exception is thrown even if SQL Server is UP!
Once the Server is up, we want the connection to succeed.
Now, How do we handle this scenario?
How do we invalidate the Connection Pool?
thanks,
HiChetu