Microsoft distributes Microsoft SQL Server 2005 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 2005 fix release.

Consider the following scenario:

  • You have installed Microsoft SQL Server 2005 Service Pack 2 (SP2) Cumulative Update 9 or a later SP2 cumulative update for SQL Server 2005 Analysis Services. Or, you have installed SQL Server 2005 SP3 or a later SP3 cumulative update for SQL Server 2005 Analysis Services.

  • You set up a query log on the server.

  • You synchronize a database on the server.

In this scenario, all records in the query log table are truncated.Note This problem also exists in SQL Server 2008 and in SQL Server 2008 R2. For more information, see the "More Information" section.

Symptoms

The fix for this issue was first released in Cumulative Update 3 for SQL Server 2005 Service Pack 3. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:

967909 Cumulative update package 3 for SQL Server 2005 Service Pack 3Note 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 2005 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:

960598 The SQL Server 2005 builds that were released after SQL Server 2005 Service Pack 3 was releasedMicrosoft SQL Server 2005 hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2005 Service Pack 3 hotfix to an installation of SQL Server 2005 Service Pack 3. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.

Resolution

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Status

This problem is not fixed in SQL Server 2008 or in SQL Server 2008 R2. SQL Server 2008 truncates the OlapQueryLog table every time that synchronization runs, because synchronization replaces the destination database by using a fresh copy of the database. This affects scenarios such as synchronization, attaching an existing database, or restoring an existing database.  In SQL Server 2008, there is no internal indicator to suggest to the synchronization threads that the refreshed database schema design has or has not been altered, compared with the existing database schema design. Therefore, each synchronization truncates the OlapQueryLog table. Usually, the OlapQueryLog table should be truncated when the database design (cube, dimension, measure group) has changed structure to prevent the outdated query usage information in prior revisions from misleading the aggregation design wizard to make the wrong suggestions. One workaround is to create a user-defined "after insert" trigger on the OlapQueryLog table in your relational database to duplicate the newly inserted rows into your own table. This table can be manually maintained as you want. For example:create trigger SaveQueryLog on OlapQueryLog after insertas insert into dbo.CopyOfQueryLog select * from inserted When you use the workaround, you have to manually maintain the CopyOfQueryLog table in order to keep accurate historical information on database query activity recorded. You must manually truncate the table at any time that an Analysis Services database schema change is made, or at least delete those affected objects from the CopyOfQueryLog. This maintenance is required to stop the activity against old schema revisions from influencing aggregation design on newer revisions of the Analysis Services database.Note The name of the query log table may vary in your environment. The name is specified in the configuration setting QueryLog\QueryLogTableName. For more information about server log files, visit the following Microsoft Developer Network (MSDN) website: http://msdn.microsoft.com/en-us/library/ms174827.aspxFor more information about how to configure the Analysis Services query log, visit the following Microsoft TechNet website:http://technet.microsoft.com/en-us/library/cc917676.aspx

More Information

For more information about the list of builds that are available after SQL Server 2005 Service Pack 3, click the following article number to view the article in the Microsoft Knowledge Base:

960598 The SQL Server 2005 builds that were released after SQL Server 2005 Service Pack 3 was released For more information about the Incremental Servicing Model for SQL Server, click the following article number to view the article in the Microsoft Knowledge Base:

935897 An Incremental Servicing Model is available from the SQL Server team to deliver hotfixes for reported problems For more information about how to obtain SQL Server 2005 Service Pack 3, click the following article number to view the article in the Microsoft Knowledge Base:

913089 How to obtain the latest service pack for SQL Server 2005 For more information about the new features in SQL Server 2005 SP3 and about the improvements in SQL Server 2005 SP3, visit the following Microsoft website:

http://go.microsoft.com/fwlink/?LinkId=131442 For more information about the naming schema for SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:

822499 New naming schema for Microsoft SQL Server software update packages For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

References

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.