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. Java中char和String 的深入理解 - 字符编码

    开篇 https://blog.csdn.net/weixin_37703598/article/details/80679376 我们并不是在写代码,我们只是将自己的思想通过代码表达出来! 1 将思 ...

  2. Python程序员常用的IDE和其它开发工具

    概述 “工欲善其事,必先利其器”,如果说编程是程序员的手艺,那么IDE就是程序员的吃饭家伙了. IDE的全称是Integration Development Environment(集成开发环境),一 ...

  3. SpringBoot(7) SpringBoot启动方式

    第一种启动方式:对含有main方法的类进行 Run As Java Application 第二种方式:对项目“Maven Install”  生成jar包 在target目录下(java -jar ...

  4. SpringBoot学习(八)-->SpringBoot之过滤器、监听器

    本文将直接使用@WebFilter和@WebListener的方式,完成一个Filter 和一个 Listener. 过滤器(Filter)和 监听器(Listener)的注册方法和 Servlet ...

  5. springBoot系列-->springBoot注解大全

    一.注解(annotations)列表 @SpringBootApplication:包含了@ComponentScan.@Configuration和@EnableAutoConfiguration ...

  6. 判断本机ip是电信还是网通

    string location = "0";//0是网通 1是电信 Uri uri = new Uri("http://www.ip138.com/ips138.asp& ...

  7. .Net NPOI 上传excel文件、提交后台获取excel里的数据

    1.导入NPOI.dll 2.添加类NPOIExcel.cs using System; using System.Collections.Generic; using System.Text; us ...

  8. 阿里云免费SSL证书申请与安装使用(IIS7)

    准备: 阿里云已完成备案的域名一个 第一步:免费SSL证书申请 登陆阿里云平台,在域名控制台下,选择你的域名,点击“SSL”证书,如图所示 再跳转后的页面,选择“单域名免费证书”,并补全域名,非二级域 ...

  9. IIS Tomcat共享80端口

    为什么有这种需求, 原因是这样的, 公司有一个Java的web项目,在另一台服务器A上,最近老板一时兴起,想把他合并到这台稳定点的服务器B上,服务器B上使用IIS来寄宿asp.net 网站, 怎么办呢 ...

  10. [android] android消息机制入门

    上一节,先把访问网络的部分放到一个子线程里面去执行,new Thread(){}.start(),new Thread直接使用匿名内部类来实现,重写run()方法,内部类访问外部的变量,这个变量应该定 ...