templog file size

Copper Contributor

hi guys, just want to get some advice if there is a way to limit the size of templog file in a local drive.  Server I am using is a SQL 2017.  had an issue of the TempDB local drive capacity full and realised that the templog has grown to 225GB in size.  As an interim, we moved the 225GB somewhere else.  At the moment the log is growing and we might hit high again in a few weeks or months.

 

Appreciate your help.

1 Reply

@bangs88 

Yes, you can limit the growth either through SSMS or using T-SQL: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-file-and-filegroup...

 

In SSMS, right click on the database and go to the Files tab. There, select the ellipses for the templog file, and set Maximum File Size to Limited.

 

However, it would be worth your time to uncover why the templog grew to that size, as it is likely to happen again. HTH