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

Article translations Article translations
Article ID: 2793580 - View products that this article applies to.
Microsoft distributes Microsoft SQL Server 2008 R2 Service Pack 2 (SP2) fixes as one downloadable file. Because the fixes are cumulative, each new 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.
Expand all | Collapse all

On This Page

Introduction

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 or in Microsoft SQL Server 2008.

More information

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 MSDB
GO
 
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_id
FROM syscollector_collection_sets 
WHERE collection_set_uid = @collection_set_uid;
 
 
SET @collection_item_id = NULL;
SELECT @collection_item_id = collection_item_id
FROM 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 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:
General information about the management data warehouse

Properties

Article ID: 2793580 - Last Review: July 15, 2013 - Revision: 5.0
Applies to
  • Microsoft SQL Server 2008 R2 Service Pack 2
  • Microsoft SQL Server 2008 R2 Datacenter
  • Microsoft SQL Server 2008 R2 Enterprise
  • 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
Keywords: 
kbqfe kbfix kbsurveynew kbexpertiseadvanced KB2793580

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com