Overview
Although we could run the data collector set as it is configured now, there is one issue that we would encounter if we tried to run it a second time: the data file already exists. This file would have to be manually deleted before we could re-run the collector set. Fortunately, Perfmon has a way to address this issue.
Explanation
To do this, we need to open the “Properties” of the data collector set by right-clicking on the name and selecting “Properties.”

After the “Properties” window of the data collector set opens, select the “Directory” tab. Here we can see the root directory we configured earlier, and in the “Subdirectory name format” box, we can add a format string to create a subdirectory for each run. Shown below, for the collector we created, I’ve added the date (yyyyMMdd) and serial number (NNNNNN) for the subdirectory name. The full list of format identifiers can be displayed by selecting the “>” to the right of the text box. Once done, click “OK,” and now the collector set can be run multiple times without having to manually remove the previous set of data files.

Ben Snaidero has been a Database Administrator for just over 10 years. Starting out working mainly with Oracle he got into SQL Server in 2005 and has worked primarily with SQL Server for the last 3 years. His main focus with both Oracle and SQL Server is in the area of performance tuning.
- MSSQLTips Awards: Achiever (75+ tips) – 2018 | Author of the Year Contender – 2016-2017


