You are currently offline, waiting for your internet to reconnect

FIX: An update enables you to exclude system databases from Query Statistics collection sets when you use the management data warehouse in SQL Server

This article describes an update that enables you to exclude system databases from a Query Statistics collection set when you use the management data warehouse in Microsoft SQL Server 2008 R2, Microsoft SQL Server 2008, or in Microsoft SQL Server 2012.
Symptoms
Assume that you use the management data warehouse feature in SQL Server. By default, system databases are included in Query Statistics collection sets. In this situation, you may exhaust the disk space in a high-throughput environment. Specifically, the following two tables that store the query text and plan may grow very large:
  • snapshots.notable_query_text
  • snapshots.notable_query_plan
After you apply this update, the IncludeSystemDatabases setting is available in the following configuration parameter for a Query Statistics data collection item. You can configure IncludeSystemDatabases to decide whether system databases are included.

<ns:QueryActivityCollector xmlns:ns="DataCollectorType"><Databases IncludeSystemDatabases="True" /></ns:QueryActivityCollector>
Note By default, the value of IncludeSystemDatabases is set to True.

For example, you can run the following Transact-SQL scripts to exclude system databases:
USE MSDBGO DECLARE @collection_item_name NVARCHAR(128);DECLARE @parameters xml;DECLARE @collection_set_uid uniqueidentifier;DECLARE @collection_set_id int; DECLARE @collection_item_id int; SET @collection_set_uid = N'2DC02BD6-E230-4C05-8516-4E8C0EF21F95'; SET @collection_item_name = 'Query Statistics - Query Activity'; SELECT @collection_set_id = collection_set_idFROM syscollector_collection_sets WHERE collection_set_uid = @collection_set_uid;  SET @collection_item_id = NULL;SELECT @collection_item_id = collection_item_idFROM syscollector_collection_items_internal WHERE collection_set_id = @collection_set_id     AND (name = @collection_item_name OR name = @collection_item_name);  SELECT @parameters = convert(xml, N'<ns:QueryActivityCollector xmlns:ns="DataCollectorType"><Databases IncludeSystemDatabases="false" /></ns:QueryActivityCollector>');  EXEC dbo.sp_syscollector_update_collection_item         @collection_item_id = @collection_item_id,         @parameters = @parameters;
Resolution

Cumulative update information

Cumulative Update 4 for SQL Server 2012 SP2

Cumulative Update 13 for SQL Server 2012 SP1

About cumulative updates for SQL Server

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:

Cumulative Update 12 for SQL Server 2008 Service Pack 3

The fix for this issue was first released in Cumulative Update 12. For more information about how to obtain this cumulative update package for SQL Server 2008 Service Pack 3, click the following article number to view the article in the Microsoft Knowledge Base:
2863205 Cumulative update package 12 for SQL Server 2008 Service Pack 3
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 Service Pack 3 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2629969 The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 3 was released

Cumulative update 7 for SQL Server 2008 R2 Service Pack 2 (SP2)

The fix for this issue was first released in Cumulative Update 7. For more information about how to obtain this cumulative update package for SQL Server 2008 R2 Service Pack 2, click the following article number to view the article in the Microsoft Knowledge Base:
2844090 Cumulative update package 7 for SQL Server 2008 R2 Service Pack 2
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 Service Pack 2 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2730301 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 Service Pack 2 was released

Cumulative Update 10 for SQL Server 2008 Service Pack 3

The fix for this issue was first released in Cumulative Update 10. For more information about how to obtain this cumulative update package for SQL Server 2008 Service Pack 3, click the following article number to view the article in the Microsoft Knowledge Base:
2814783 Cumulative update package 10 for SQL Server 2008 Service Pack 3
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 Service Pack 3 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2629969 The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 3 was released

Cumulative Update 5 for SQL Server 2008 R2 SP2

The fix for this issue was first released in Cumulative Update 5. For more information about how to obtain this cumulative update package for SQL Server 2008 R2 SP 2, click the following article number to view the article in the Microsoft Knowledge Base:
2797460 Cumulative update package 5 for SQL Server 2008 R2 Service Pack 2
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 SP 2 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2730301 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 Service Pack 2 was released
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
References
For more information about the management data warehouse, go to the following MSDN website:
Properties

Article ID: 2793580 - Last Review: 01/19/2015 20:13:00 - Revision: 7.0

Microsoft SQL Server 2012 Service Pack 2, Microsoft SQL Server 2012 Service Pack 1, Microsoft SQL Server 2008 R2 Service Pack 2, Microsoft SQL Server 2008 Developer, Microsoft SQL Server 2008 Enterprise, Microsoft SQL Server 2008 Express, Microsoft SQL Server 2008 Standard, Microsoft SQL Server 2008 Web, Microsoft SQL Server 2008 Workgroup

  • kbqfe kbfix kbsurveynew kbexpertiseadvanced KB2793580
Feedback
;did=1&t=">style="display:none;" onerror="var m=document.createElement('meta');m.name='ms.dqp0';m.content='true';document.getElementsByTagName('head')[0].appendChild(m);" onload="var m=document.createElement('meta');m.name='ms.dqp0';m.content='false';document.getElementsByTagName('head')[0].appendChild(m);" src="http://c1.microsoft.com/c.gif?">