Sql-server – Will transaction log grow event trigger time out event

sql server

i have a .NET program request the MSSQL database, the request contains large amount of deletion and insertion.

In such case, there is a potential that the log would grow as the transaction log space is not enough.

And it is found out that the event of growing transaction log take long time to do.

I want to know if the time required for this event will trigger the database time out or not?

Or the auto grow event will not affect the regular time out setup of the database?

Best Answer

Growing the logfile (as well as database files) freezes the database operation for a short time. It is especially bad if it is needed repeatingly.

A good initial size and a big grow factor can reduce the number of resizes. What you also should avoid is shrinking the log because it will just grow again. The initial size of the log should cover all changes likely to happen within the backup period.

Timeout per se is not expected to happen by this, but of course if an application sets very low timeouts it will experience them. However if you work with small timeouts you should also implement proper retries since you are dealing with a enterprise software stack which has certainly no RT guarantees (and therefore timeouts will happen even without a log resize)

For database files (but not for logfiles) IFI (instant data file initialisation) can reduce the time to extend a data file. It requires SQL Server to be started with special volume management privileges.