Causing a timeout error

  • Occasionally, we get a 'hiccup' that causes the connection to SQL Server to drop from a script. I currently log these events, and see the following message:

    Desc: [Microsoft][SQL Server Native Client 11.0]TCP Provider: Timeout error [258]

    I'm working on a way to handle this, but would like to test this. I created backup tables in the same database for this purpose, and I'm not sure how to cause a timeout error for these test tables without disrupting the rest of the database.

    TL;DR - Need cause a timeout error in the script when trying to create a database connection in vbscript, and hopefully without causing any issues for the rest of the database.

    As always, any help/guidance would be very much appreciated.

    -Rudy.

  • What if I create a transaction on the table and leave it uncommitted, will this cause a timeout in the script when trying to connect? If so, will this only lock up the table, not the entire database?

  • ram302 (10/20/2016)


    What if I create a transaction on the table and leave it uncommitted, will this cause a timeout in the script when trying to connect?

    No. That'll just leave a lock on the table. You might end up getting a command timeout when running queries against that table from an app, but not a connection timeout (timeout connecting to the DB)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply