From: Orwell on
Hi --

We're having a problem where once in a while, a database connection
goes bad and some queries within a process fail. We've put in code to
handle that, but we're trying to test it and can't think of a way to
test it in our lab to make sure our fix corrects the problem. When we
try to kill the process within SQL Server, it recognizes that there is
no process and just spawns a new one.

Does anybody know of a way to simulate a connection error while using
SQL Server? The obvious things -- shut down the SQL Server service,
etc -- are a little draconian and don't really match the issue, which
is that once in a while, a single connection in a pool goes bad.
Again, we've put in code that should resolve the issue, just want to
test it prior to putting it into a production environment and just
"hoping for the best."

Thanks in advance
From: mgm on
can you use the firewall to temporarily cut traffic to port 1433?

"Orwell" wrote:

> Hi --
>
> We're having a problem where once in a while, a database connection
> goes bad and some queries within a process fail. We've put in code to
> handle that, but we're trying to test it and can't think of a way to
> test it in our lab to make sure our fix corrects the problem. When we
> try to kill the process within SQL Server, it recognizes that there is
> no process and just spawns a new one.
>
> Does anybody know of a way to simulate a connection error while using
> SQL Server? The obvious things -- shut down the SQL Server service,
> etc -- are a little draconian and don't really match the issue, which
> is that once in a while, a single connection in a pool goes bad.
> Again, we've put in code that should resolve the issue, just want to
> test it prior to putting it into a production environment and just
> "hoping for the best."
>
> Thanks in advance
> .
>