2017-11-01 09:49:44.35 spid166     SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Object Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.
2017-11-01 09:49:47.85 spid166 SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'SQL Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.
2017-11-01 09:49:47.85 spid166 SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Bound Trees' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.

数据库ERRORLOG中出现类似记录,因此去查找相关的文档,发现SQL Server在做一些配置变更时会彻底清除一次执行计划缓存,这很好的解释了许多时候修改最大内存也会导致执行计划变更,SQL执行性能变化的现象。具体的官方文档为:https://support.microsoft.com/en-us/help/917828/you-may-experience-a-decrease-in-query-performance-after-you-perform-c

但是官网也申明此类现象只在SQL Server2005SP2之前的版本出现,以后的版本已经修复,具体表现还未可知。

文档中列出了所有可能导致此种情况出现的操作:

    • A database has the AUTO_CLOSE database option set to ON. When no user connection references or uses the database, the background task tries to close and shut down the database automatically.
    • You run several queries against a database that has default options. Then, the database is dropped.
    • A database snapshot for a source database is dropped.

      Note Database snapshots are only available in Microsoft SQL Server 2005 Enterprise Edition.

    • You change the database state to OFFLINE or ONLINE.
    • You successfully rebuild the transaction log for a database.
    • You restore a database backup.
    • You run the DBCC CHECKDB statement.

      Note This is true only in versions of SQL Server 2005 that are earlier than SQL Server 2005 SP2. After you install SQL Server 2005 SP2 or later versions, the whole procedure cache is not flushed when you run the DBCC CHECKDB statement.

    • You detach a database.
    • You specify one of the following options when you run the ALTER DATABASE statement:
      • OFFLINE
      • ONLINE
      • MODIFY FILEGROUP DEFAULT
      • MODIFY_NAME
      • MODIFY FILEGROUP READ_WRITE
      • COLLATE
      • MODIFY FILEGROUP READ_ONLY
      • READ_ONLY
      • READ_WRITE
    • The whole procedure cache is cleared if one of the following server options is changed by the RECONFIGURE statement:
      • cross db ownership chaining
      • index create memory (KB)
      • remote query timeout (s)
      • user options
      • max text repl size (B)
      • cost threshold for parallelism
      • max degree of parallelism
      • min memory per query (KB)
      • query wait (s)
      • min server memory (MB)
      • max server memory (MB)
      • query governor cost limit

      Note Procedure cache will not be cleared if the actual value does not change or if the new value for the max server memory server option is set to 0.

SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Object Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.的更多相关文章

  1. 缓解 SQL Server has encountered 727 occurrence(s) of I/O requests taking longer than 15 seconds

    sql server 会记录IO等待时间超过15 seconds的请求,这时application会有 time out 现象,dba需要判断是workload,concurrecy 所致还是sql ...

  2. SQL Server 磁盘请求超时的833错误原因分析以及解决

    本文出处:http://www.cnblogs.com/wy123/p/6984885.html 最近遇到一个SQL Server服务器响应极度缓慢,并且出现客户端请求报错的情况,在数据库中的erro ...

  3. Microsoft SQL Server Trace Flags

    Complete list of Microsoft SQL Server trace flags (585 trace flags) REMEMBER: Be extremely careful w ...

  4. 疑难杂症--SQL SERVER 18056的错误

    朋友遇到一个很棘手的问题,查看服务器日志,报以下错误: ::,spid296,未知,错误: ,严重性: ,状态: . ::,spid495,未知, The client was unable < ...

  5. SQL Server 内存相关博文

    Don’t confuse error 823 and error 832 本文大意:      错误832:           A page that should have been const ...

  6. RML Utilities for SQL Server

    很早以前有看到过关于使用RML Utilities工具分析SQL Trace(.trc)的文章,但一直没有具体实践.最近接管一台数据库服务器,跟踪出一批高消耗的语句,老大需要跟踪分析报表,罗列出过程( ...

  7. Migrating Oracle on UNIX to SQL Server on Windows

    Appendices Published: April 27, 2005 On This Page Appendix A: SQL Server for Oracle Professionals Ap ...

  8. Microsoft SQL Server Version List [sqlserver 7.0-------sql server 2016]

    http://sqlserverbuilds.blogspot.jp/   What version of SQL Server do I have? This unofficial build ch ...

  9. Microsoft SQL Server Version List(SQL Server 版本)

    原帖地址 What version of SQL Server do I have? This unofficial build chart lists all of the known Servic ...

随机推荐

  1. MFC 控件编程之水平滚动条跟垂直滚动条

    MFC 控件编程之水平滚动条跟垂直滚动条 一点水平滚动条的操作 首先在操作滚动条的时候.我们要知道滚动条的一些属性. 比如我们要设置 最大值 最小值. 以及每次递增的值是多少.都要设置. 所有就有一个 ...

  2. 【原创】浅说windows下的中断请求级IRQL

    一 中断分类 根据中断源不同,可以将中断分为 硬件中断:硬件上产生的中断,可以来自处理器的内部和外部.处理器的外部中断可以来自各种PIN信号接口和Local APIC的LINT0和LINT1引脚,以及 ...

  3. Wireshark的基本使用——过滤器

    前言 网络上关于Wireshark的教程已有不少,博主就简单介绍一下Wireshark分析数据包时最重要的技巧之一的过滤器..一次性嗅探到的数据包有很多,想要高效地提取出你想要的数据包或者对某个数据包 ...

  4. 三大主流软件负载均衡器对比(LVS VS Nginx VS Haproxy)

    LVS:1.抗负载能力强.抗负载能力强.性能高,能达到F5硬件的60%:对内存和cpu资源消耗比较低2.工作在网络4层,通过vrrp协议转发(仅作分发之用),具体的流量由linux内核处理,因此没有流 ...

  5. 【Go】优雅的读取http请求或响应的数据

    [Go]优雅的读取http请求或响应的数据 原文链接:https://blog.thinkeridea.com/201901/go/you_ya_de_du_qu_http_qing_qiu_huo_ ...

  6. YTKNetwork源码详解

    本篇是第三篇关于网络请求的,将讲述YTKNetwork源码,上述两篇分别讲述AFNetworking源码解析以及结合自己项目封装AFNetworking. AFNetworking源码解析:https ...

  7. [转]MySQL查询缓存清空

    本文转自:https://www.cnblogs.com/wangyiwei/p/7765457.html 可以通过下面的SQL查看当前查询缓存相关参数状态:   SHOW VARIABLES LIK ...

  8. [转]c# System.IO.Ports SerialPort Class

    本文转自:https://docs.microsoft.com/en-us/dotnet/api/system.io.ports.serialport?redirectedfrom=MSDN& ...

  9. 【Java每日一题】20170302

    20170301问题解析请点击今日问题下方的“[Java每日一题]20170302”查看(问题解析在公众号首发,公众号ID:weknow619) package Mar2017; public cla ...

  10. 教你搞定ElasticSearch(head)

    简介: ElasticSearch(以下简称ES)是一个基于Lucene构建的开源(open-source),分布式(distributed),RESTful,实时(real-time)的搜索与分析( ...