Applies To: SQL Server 2014, SQL Server 2016 Preview
Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
Updates an existing row or inserts a new row in the management data warehouse core.source_info_internal table. This procedure is called by the data collector run-time component every time an upload package starts uploading data to the management data warehouse.
Applies to: SQL Server (SQL Server 2008 through current version).
core.sp_update_data_source [ @collection_set_uid = ] 'collection_set_uid' ,[ @machine_name = ] 'machine_name' , [ @named_instance = ] 'named_instance' , [ @days_until_expiration = ] days_until_expiration , [ @source_id = ] source_id OUTPUT
Every time an upload package starts uploading data to the management data warehouse, the data collector run-time component calls core.sp_update_data_source. The core.source_info_internal table is updated if one of the following changes has happened since the last upload:
A new collection set was added.
The value for days_until_expiration has changed.
The following example updates the data source (in this case the Disk Usage collection set), sets the number of days until expiration, and returns the identifier for the source. In the example, the default instance is used.
USE <management_data_warehouse>; GO DECLARE @source_id int; EXEC core.sp_update_data_source @collection_set_uid = '7B191952-8ECF-4E12-AEB2-EF646EF79FEF', @machine_name = '<computername>', @named_instance = 'MSSQLSERVER', @days_until_expiration = 10, @source_id = @source_id OUTPUT;