Occasionally the SQL Data Collections will stop collecting even though the collection sets are still running (see "System Hangs" section in this post: https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/bb677178(v=sql.105)). If none of the conditions under that section apply, and restarting data collections does not work, then the cache files may also need to be deleted, in addition to a restart.
To simplify this process, you can create a SQL Agent job to do all of this automatically. The SQL Agent job should have 3 steps:
1. Stop the Data Collections (example is for the 3 default collection sets)
2. run the stored procedure "uspDeleteCacheFiles" - this detects the cache file location and then deletes all files with a ".cache" extension. It also confirms whether the data collection sets have been stopped, as this must be the case before cache files can be deleted. This procedure also requires XPCmdShell for file system access to be enabled:
GO
RECONFIGURE;
GO
sp_configure 'xp_cmdshell', 1;
GO
RECONFIGURE;
GO
3. Start the data collections
This process has been tested on all SQL Server versions after SQL 2008. We have found that restarts have periodically been required on all SQL Server versions, as explained under the "System Hangs" section in the Troubleshooting post above.