最近遇到一起关于"I/O is frozen on database xxx. No user action is required. However, if I/O is not resumed promptly, you could cancel the backup."的案例。

出现问题的时候,我去执行一个非常简单的SQL语句,执行时间非常长,检查没有阻塞。正常情况下,应该是几秒就OK。后面检查错误日志,发现有大量这类消息.而这个点,我们没有备份数据库的作业。后面搜索,了解了一下这个消息出现的原因:

参考网上资料,关于“I/O is frozen on database xxx. No user action is required”的介绍如下:

This message is logged in the Error Log whenever any backup service making use of SQL Server Virtual Device Interface (VDI) tries to backup the database (with snapshot)/drive on which the database files reside. Microsoft Backup (ntbackup.exe), Volume Shadow Copy (VSS), Data Protection Manager (DPM) and third party tools like Symantec Business Continuance Volume (BCV) are some of the application which cause this message to logged in the SQL Server Error Log.

What does these messages mean? Let me explain this with an example. Suppose ntbackup.exe is configured to take the backup of D drive. This drive has some data files related to few databases on SQL Server. Since the data files are in use by SQL Server, if these files are copied as it is the files in the backup will be inconsistent. To ensure that the database files are consistent in the drive backup, this application internally issues a BACKUP DATABASE [databasename] WITH SNAPSHOT command against the database. When this command is issued, the I/O for that database is frozen and the backup application is informed to proceed with its operation. Until the BACKUP WITH SNAPSHOT command is complete, the I/O for the database is frozen and the I/O is resumed once it completes. The corresponding messages are logged in the SQL Server Error Log.

翻译如下:

当任何备份服务利用SQL Server虚拟设备接口(VDI)尝试备份数据库(使用with snapshot时)或数据库文件所在的磁盘时,这个消息就会记录在错误日志(Error Log)里。 Micorsoft Backup(ntbackup.exe),卷影复制(Volume Shadow Copy VSS), 数据保护管理器(Data Protection Manager DPM)和第三方工具,例如赛门铁克Symantec 业务连续性卷(Business Continuance Volume)(BCV),这些都是会导致这类消息记录到SQL Server错误日志的应用程序。

那么这些消息是什么意思呢? 让我用一个例子来解释下。 假设你配置ntbackup.exe去备份D盘。这个磁盘上有一些SQL Server的数据库相关的数据文件。由于SQL Server要使用那些数据文件,因此如果这些文件在备份时复制将出现不一致。为了确保数据库文件在磁盘备份时是一致的,这些应用程序内部会使用BACKUP DATABASE [databasename] WITH SNAPSHOT命令来备份数据库。当命令执行时,数据库上的I/O会冻结并且备份应用程序被通知继续进行起操作。直到BACKUP WITH SNAPSHOT命令执行完成,数据库的冻结的I/O当备份命令一旦完成就会恢复。相应的消息也就会记录到SQL Server错误日志中。

后面检查发现,刚刚我们在这个时间段有PlateSpin的备份作业在运行(数据库服务器是VMware,系统管理员用PlateSpin做DR)。所以也是错误日志出现这些消息的原因。 另外,关于这个知识点,也有下面一些资料供参考、学习。

案例 Frozen messages while taking NT Backup for SQL databases

关于VDI(VSS)的介绍,可以参考下面链接

How It Works: SQL Server – VDI (VSS) Backup Resources

另外关于Database Snapshots (SQL Server)它也是有一些限制和性能开销的。如下截图所示:

参考资料:

http://www.sqldbadiaries.com/2010/11/28/io-is-frozen-on-database-no-user-action-is-required/

https://blogs.msdn.microsoft.com/psssql/2009/03/03/how-it-works-sql-server-vdi-vss-backup-resources/

https://msdn.microsoft.com/en-us/library/ms175158.aspx

IO is frozen on database xxx, No user action is required相关推荐

  1. 【Laravel】连接 sqlite 数据库 Database [xxx] not exist

    .env 文件 DB_CONNECTION=sqlite VIRSH_SQLITE_DATABASE=database_path('database.sqlite') config/database. ...

  2. mysql出现Access denied for user ‘root‘@‘%‘ to database ‘xxx‘ 解决办法

    最近遇到一个问题,在创建数据库后连接数据库的时候报错,错误代码是Access denied for user 'root'@'%' to database 'xxx' 解决方法 创建数据库 creat ...

  3. Cannot drop the database ‘XXX’ because it is being used for replication.

    删除订阅数据库的时候出现下面的错误: Cannot drop the database 'XXX'  because it is being used for replication. 数据库的状态为 ...

  4. Unknown database ‘xxx‘

    问题: 启动项目报错Unknown database 'xxx' 解决办法: 数据库名错了,改成已存在对的即可.

  5. Mac_ThinkPHP报错:SQLSTATE[HY000] [1049] Unknown database 'XXX'

    已经很明显了 SQLSTATE[HY000] [1049] Unknown database 'XXX' 翻译: SQLSTATE[HY000][1049]未知数据库"XXX" 意 ...

  6. Can't create database 'xxx' (errno: 28)

    创建数据库时抛出该异常,百思不得解,为啥不让我创建数据库 Can't create database 'xxx' (errno: 28) 于是问度娘   liunx服务器磁盘满了 df -h 命令一看 ...

  7. 访问网站出现Access denied for user 'root'@'%' to database 'xxx'

    在linux下连接了数据库之后,网页上显示Access denied for user 'root'@'%' to database 'xxx'的字样时, 通过数据库授权: grant all on ...

  8. Python, SQL: Cannot drop database XXX because it is currently in use解决方法

    在使用pymssql连接SQL Server时遇到这个问题: pymssql.OperationalError: (3702, b'Cannot drop database "XXX&quo ...

  9. MySQL使用root用户给某用户分配权限报错:Access denied for user 'root'@'%' to database 'xxx'

    这个错误相信很多人都遇到过,一般我们想到的第一点就是没有授权,然后一条命令走起: grant all on xxxx.* to 'root'@'%' identified by 'password' ...

最新文章

  1. 实现数据“一键脱敏”,Sharding Sphere帮你搞定
  2. ubuntu|利用system来新建文件夹
  3. vc6 C/C++的64位整型
  4. oracle10g資料庫調效,資料庫 | 簡睿隨筆 | 學習過程的紀錄與備忘
  5. Visual Code 快捷创建HTML,CSS和Class
  6. Jenkins环境搭建(2)-搭建jmeter+ant+jenkins自动化测试环境
  7. 每天一道LeetCode-----计算二叉树的最大路径和,路径只需要从一个节点到达另一个节点,无其他要求
  8. js slice 参数为负值
  9. php dao 接口,SSH中公共Dao层、Dao接口
  10. 镜像电流源特点_电流源传奇——镜之分身
  11. OJ每日一练——计算分数加减表达式的值
  12. 利用Python scapy爬取起点小说网小说
  13. ubuntu ffmpeg 录制系统音频
  14. 小觅双目摄像头标准版视觉惯性 SLAM DEMO
  15. 如果不懂 numpy,请别说自己是 python 程序员
  16. 为什么说python是最好的语言!学校_为什么说python语言是最好的选择?老男孩教育...
  17. 爬虫学习实践(1)——我的第一个小爬虫
  18. Java 扫描识别条形码图片
  19. LSTM 长短期记忆循环神经网络(学习笔记)
  20. 服务器导出word文档中有乱码,使用Aspose.word DOC转PDF文件乱码问题-Doc文件

热门文章

  1. 单调队列以及单调队列优化DP
  2. centos7环境下MySQL安装教程
  3. SQL优化笔记(二)—CPU优化
  4. VS2010不能编译.Net3.5项目的解决方法
  5. 今年四月份,发现我的文章被人全部复制了,抄到博客园了,连原文出处都没有,就算你写个参考文章也行呀
  6. Go学习笔记(一)windows下的Go 语言环境安装,并运行第一个Hello World程序
  7. datetime类型保存的时间比实际时间少8小时
  8. SpringBoot集成MyBatis-Plus代码生成器(Dao)
  9. 深入分析Java中的关键字static
  10. MySQL免安装版安装