Specifies the directory where collected data is stored before it is uploaded to the management data warehouse.
Applies to: SQL Server (SQL Server 2008 through current version).
You must disable the data collector before changing the cache directory configuration. This stored procedure fails if the data collector is enabled. For more information, see Enable or Disable Data Collection, and Manage Data Collection.
The specified directory does not need to exist at the time the sp_syscollector_set_cache_directory is executed; however, data cannot be successully cached and uploaded until the directory is created. We recommend creating the directory before executing this stored procedure.
The following example disables the data collector, sets the cache directory for the data collector to D:\tempdata,and then enables the data collector.