Monthly Archives: November 2012

T-SQL Script to Split Tempdb Data Files with Alignment of the Number of CPU Cores

“One tempdb date file per core” is proved to be a myth by Paul Randal and quoted from his blog it is a conlusion that : “If you have > 8 cores, use 8 files and if you’re seeing in-memory … Continue reading

Posted in T-SQL Script | Tagged , | 2 Comments

T-SQL Script to Delete Older-Than-N-Days Backups in a Specific Folder

I’ve noticed there are quite some hits on this post and the old format of the T-SQL code looked a bit messy, so I’ve done a makeover of the script on 2014-04-10. This script requires a not-too-strict security setting for … Continue reading

Posted in Backup and Restore, T-SQL Script | Tagged , | 2 Comments

T-SQL Script to Quickly Truncate the Log File of a Database

Sometimes, as a DBA you are requested urgently by either users or your supervisors to quickly truncate a log file. It is not a very good practice first of all and you should have already avoided this situation if you … Continue reading

Posted in T-SQL Script | Tagged , | Leave a comment