SQL Server Performance

.NET SQL Exception

Discussion in 'T-SQL Performance Tuning for Developers' started by chilisauce, Mar 12, 2004.

  1. chilisauce New Member

    I am trying to troubleshoot a timeout issue with SQL 2k and .NET. I have scoured the interent and alot of people are having this problem but no one seems to have a solution. The application has a query timeout of 45 seconds. The command timeout is set to the default which I believe is 30 seconds. I know we can increase the timeout but that is not something management is willing to do. Therefore, I was wondering if anyone had any advice on this issue.

    I can post the entire stack if needed.

    .Net SqlClient Data Provider
    STACK: System.Data.SqlClient.SqlException: Timeout expired.
  2. gaurav_bindlish New Member

    You can create a job for the process and then trigger it off from the application. This way the control will return to the application immediately and then later you can keep on polling the job status to see if it has completed.

    Gaurav
    Moderator
    Man thrives, oddly enough, only in the presence of a challenging environment- L. Ron Hubbard

    The views expressed here are those of the author and no one else. There are no warranties as to the reliability or accuracy of anything presented here.
  3. satya Moderator

    Try changing the CommandTimeout property of the SqlCommand object.
    And trace out root cause for this behaviour from event viewer log, sql server log and take help of network admin for any information.

    Satya SKJ
    Moderator
    http://www.SQL-Server-Performance.Com/forum
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.

Share This Page