当前位置: 首页 > article >正文

SQL Server 2019数据库“正常,已自动关闭”

现象:

SQL Server 2019中,某个数据库在SQL Server Management Studio(SSMS)中的状态显示为“正常,已自动关闭”。

解释:

如此显示,是由于该数据库的AUTO_ CLOSE选项被设为True。

在微软的官方文档中,对于这个选项是这样介绍的:

When AUTO_CLOSE is set ON, this option can cause performance degradation on frequently accessed databases because of the increased overhead of opening and closing the database after each connection. AUTO_CLOSE also flushes the procedure cache after each connection.

If a database is accessed frequently, set the AUTO_CLOSE option to OFF for the database.

译文如下:

当AUTO_ CLOSE启用时,由于在每次连接时增加了打开和关闭数据库的开销,该选项可能导致频繁访问的数据库性能降低。在每次连接后,AUTO_ CLOSE也会清理过程缓存。

如果某个数据库经常被访问,则应设置该数据库的AUTO_ CLOSE选项为关闭。

解决方法:

打开该数据库的属性,在左侧选择“选项”。然后在右侧找到“自动”分组,将“自动关闭”设置为False。

参考内容:

Set the AUTO_CLOSE Database Option to OFF - SQL Server | Microsoft LearnCheck whether the AUTO_ CLOSE option is OFF. The AUTO_ CLOSE option has implications for performance in SQL Server.icon-default.png?t=O83Ahttps://learn.microsoft.com/en-us/sql/relational-databases/policy-based-management/set-the-auto-close-database-option-to-off?view=sql-server-ver15


http://www.kler.cn/news/357112.html

相关文章:

  • 【Orange Pi 5 Linux 5.x 内核编程】-驱动程序参数
  • 删除node_modules文件夹
  • 《YOLO1》论文精读:第一次实现端到端的目标检测
  • MFC工控项目实例二十五多媒体定时计时器
  • Pollard‘s p-1算法
  • 工信部绿色工厂、绿色设计产品、绿色供应链企业、绿色园区名单(2017-2022年)
  • ORACLE 的SCHEDULER创建JOB
  • 【MogDB】MogDB5.2.0重磅发布第四篇-支持windows版gsql,兼容sqlplus/sqlldr语法
  • 电影评论网站:Spring Boot技术栈应用
  • 压缩SQL Server 2014 数据库日志文件
  • OpenHarmony中EAP-PEAP认证支持 GTC方式
  • 【leetcode|哈希表、动态规划】最长连续序列、最大子数组和
  • 在合规的地方怎么用EACO地球链兑换交换价值?
  • Linux操作系统切换设置系统语言
  • C++学习笔记----9、发现继承的技巧(三)---- 尊重父类(2)
  • [环境配置]macOS上怎么查看vscode的commit id
  • 力扣动态规划基础版(斐波那契类型)
  • Android 禁止App字体随系统大小而更改
  • 其他css的用途
  • 前端excel的实现方案Luckysheet