none
CommandTimeout

    Question

  • hi 

    Whether CommandTimeout either be higher or lower value for accessing the data from database?

    Thank you in Advance


    - Ram

    Sunday, January 06, 2013 5:42 AM

Answers

  • Hello,

    Im common you can keep the CommandTimeout on the default value (30 sec). Only if problems occur, you could try to use a higher value.


    Olaf Helper

    Blog Xing

    Sunday, January 06, 2013 7:17 AM
  • As olaf says, 30 Sec is the default value, you can change it in case you face any issue.

    If you looking for Remot connection timeout, then default one is 600 seconds / 5 min.


    Regards,
    Rohit Garg
    (My Blog)
    This posting is provided with no warranties and confers no rights.
    Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread.

    Monday, January 07, 2013 1:54 PM

All replies

  • Hello,

    Im common you can keep the CommandTimeout on the default value (30 sec). Only if problems occur, you could try to use a higher value.


    Olaf Helper

    Blog Xing

    Sunday, January 06, 2013 7:17 AM
  • As olaf says, 30 Sec is the default value, you can change it in case you face any issue.

    If you looking for Remot connection timeout, then default one is 600 seconds / 5 min.


    Regards,
    Rohit Garg
    (My Blog)
    This posting is provided with no warranties and confers no rights.
    Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread.

    Monday, January 07, 2013 1:54 PM
  • Hello,

    There are many reasons to give to CommandTimeout a value higher to 30 seconds; for example

    - when you have to treat many records

    - when the SQL Server is heavily busy ( for example , many queries )

    - when you insert several records , provoking an increaed of size of the datafiles or the log files ( often because the increase size is too small or the disk too fragmented ).Never forget, that the time necessary to increase the size ogf datafile/ logfile is included in the time limited CommandTimeout.

    Please, could you provide more informations about the command you are using ? Is it inside an application or thru SSMS ( SQL Server Management Studio ) ?

    If it is inside SSMS, RohitGarg has explained how to modify the CommandTimeout for a query.If it is inside an application , you should increase the CommandTimeout property of your SqlCommand, OdbcCommand,...

    Please, could you explain what you are doing in your Command which is stopped by a Timeout ?

     Have a nice day


    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.

    Monday, January 07, 2013 10:15 PM
    Moderator