Sunday, January 06, 2013 5:42 AM
Whether CommandTimeout either be higher or lower value for accessing the data from database?
Thank you in Advance
Sunday, January 06, 2013 7:17 AM
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 HelperBlog Xing
Monday, January 07, 2013 1:54 PM
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.
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.
- Marked As Answer by Iric WenModerator Monday, January 14, 2013 9:32 AM
Monday, January 07, 2013 10:15 PMModerator
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.