SQL Trace has settings to delete old files in the INI file.
DeleteOldFiles = Yes # This triggers the switch to delete old files depending on configuration of MinFiles and MinMinutes
MinFiles = 5 # Only delete files beyond this limit that are more than MinMinutes old
MinMinutes = 1 # Only delete files older than this number of minutes (LastWriteTime) has elapsed
When testing the above on my local machine, I let it run for an hour and produced 5 files. The SQLTrace didn't delete them. I only used the ".\SQLTrace.ps1 -start " with no extra parameters.
SQL Trace has settings to delete old files in the INI file.
DeleteOldFiles = Yes # This triggers the switch to delete old files depending on configuration of MinFiles and MinMinutes
MinFiles = 5 # Only delete files beyond this limit that are more than MinMinutes old
MinMinutes = 1 # Only delete files older than this number of minutes (LastWriteTime) has elapsed
When testing the above on my local machine, I let it run for an hour and produced 5 files. The SQLTrace didn't delete them. I only used the ".\SQLTrace.ps1 -start " with no extra parameters.