Symptoms
This article describes an update that is available for Microsoft SQL Server 2012. This update changes the permission restrictions and allows for users who have SELECT permissions to run the DBCC SHOW_STATISTICS command if the following conditions are true:
-
Users have SELECT permissions on all columns in the statistics object.
-
Users have SELECT permissions on all columns in a filter condition if the filter exists.
Before a user applies the update, the user must be in one of the following roles if the user tries to run the DBCC SHOW_STATISTICS command to view the query optimization statistics on the remote tables:
-
The sysadmin fixed server role
-
The db_owner fixed database role
-
The db_ddladmin fixed database role
This permission restriction affects the distributed query functionalities. Collecting the query optimization statistics is a part of the compilation of the distributed queries. However, the user who runs the distributed queries generally does not have the permissions against the remote tables. In this situation, the distributed queries are executed in a sub-optimal query plan. Additionally, poor performance occurs when the queries run.
After the user applies this update, statistics can be used when users compile distributed queries from remote data sources where they have only SELECT permissions. Note To maintain the original permission restriction in SQL Server 2012, enable the trace flag 9485.Resolution
Cumulative update information
SQL Server 2012
The fix for this issue was first released in Cumulative Update 2 for SQL Server 2012. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2703275 Cumulative update package 2 for SQL Server 2012Note 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 2012 fix release. Microsoft recommends 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:
2692828 The SQL Server 2012 builds that were released after SQL Server 2012 was released You must apply a SQL Server 2012 hotfix to an installation of SQL Server 2012.
Hotfix information
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.
If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix. Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website:http://support.microsoft.com/contactus/?ws=supportNote The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
Prerequisites
To apply this hotfix, you must have SQL Server 2012 installed.
Restart requirement
You do not have to restart the computer after you apply this hotfix.
Hotfix replacement information
This hotfix does not replace any other hotfixes.
File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
File name |
File version |
File size |
Date |
Time |
Platform |
---|---|---|---|---|---|
Sqldk.dll |
2011.110.2318.0 |
2,007,952 |
20-Apr-12 |
1:26 |
x64 |
Sqllang.dll |
2011.110.2318.0 |
33,925,520 |
20-Apr-12 |
1:26 |
x64 |
Sqlmin.dll |
2011.110.2318.0 |
32,448,400 |
20-Apr-12 |
1:26 |
x64 |
Sqlservr.exe |
2011.110.2318.0 |
190,864 |
20-Apr-12 |
1:35 |
x64 |
Sqltses.dll |
2011.110.2318.0 |
8,923,536 |
20-Apr-12 |
1:26 |
x64 |
Sqldk.dll |
2011.110.2318.0 |
1,639,312 |
20-Apr-12 |
1:25 |
x86 |
Sqllang.dll |
2011.110.2318.0 |
25,999,248 |
20-Apr-12 |
1:25 |
x86 |
Sqlmin.dll |
2011.110.2318.0 |
26,512,272 |
20-Apr-12 |
1:25 |
x86 |
Sqlservr.exe |
2011.110.2318.0 |
160,144 |
20-Apr-12 |
1:34 |
x86 |
Sqltses.dll |
2011.110.2318.0 |
8,154,000 |
20-Apr-12 |
1:25 |
x86 |
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 original permission restriction for the DBCC SHOW_STATISTICS command, go to the following MSDN website:
General information about the original permission restriction for DBCC SHOW_STATISTICSFor more information about how to grant object permissions, go to the following MSDN website: