一台数据库服务器的事务日志备份作业偶尔会出现几次备份失败的情况,具体的错误信息为:

DATE/TIME:    2018/7/30 12:10:52

DESCRIPTION: BackupDiskFile::CreateMedia: Backup device 'M:\DB_BACKUP\LOG_BACKUP\xxxx_[2018-07-30_06h03m10_Mon]_logs.TRN' failed to create. Operating system error 32(failed to retrieve text for this error. Reason: 15105).

COMMENT:  (None)

JOB RUN:  (None)

关于Operating system error 32,这个错误代码对应的错误信息为:

The process cannot access the file because it is being used by another process.

其实以前刚好遇到过这样的案例,使用AplexSQL Log去分析事务日志的备份文件,YourSQLDba的事务日志备份的时候,就会遇到上面错误(YourSQLDba_LogBackups事务日志备份会追加到同一个备份文件),但是这个怎么定位这个错误呢?其实出现这个错误,一定有相关进程在访问事务日志备份文件,那么只要排查这些应用或程序即可。刚好最近配置了AWS的DMS的(DMS简单介绍如下,具体参考官方文档https://docs.aws.amazon.com/zh_cn/dms/latest/userguide/Welcome.html)

在最基本级别上,AWS DMS 是 AWS 云中运行复制软件的服务器。您创建源和目标连接以告知 AWS DMS 要进行提取和加载的位置。然后,计划在此服务器上运行以迁移数据的任务。AWS DMS 会创建表和关联的主键 (如果它们在目标上不存在)。如果您愿意,则可以预先手动创建目标表。或者,也可以使用 AWS SCT 创建部分或全部目标表、索引、视图、触发器等。

因为DMS有时候会读取事务日志备份文件中的内容,通过DPA监控,刚好找的了这个DMS的账号,在事务日志备份的时间点在执行下面SQL语句(如下所示)。那么就是因为这个进程在读取事务日志备份中内容(跟普通的Replication有点不同),导致事务日志备份出现Operating system error 32错误(The process cannot access the file because it is being used by another process)

  1.  

  1.  SELECT /* top 50000 */

  1.         [Current LSN] ,

  1.         [Operation] ,

  1.         [Context] ,

  1.         [Transaction ID] ,

  1.         [Transaction Name] ,

  1.         [Begin Time] ,

  1.         [End Time] ,

  1.         [Flag Bits] ,

  1.         [PartitionId] ,

  1.         [Page ID] ,

  1.         [Slot ID] ,

  1.         [RowLog Contents 0] ,

  1.         [Log Record] ,

  1.         [RowLog Contents 1]

  1.  FROM   sys.fn_dump_dblog(@P1, NULL, NULL, 11,

  1.                           'M:\DB_BACKUP\LOG_BACKUP\xxxx_[2018-08-01_06h06m19_Wed]_logs.TRN',

  1.                           NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

  1.                           NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

  1.                           NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

  1.                           NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

  1.                           NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

  1.                           NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

  1.                           NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)

  1.  WHERE  [Current LSN] COLLATE SQL_Latin1_General_CP1_CI_AS >= @P2 COLLATE SQL_Latin1_General_CP1_CI_AS

  1.         AND ( ( [Operation] IN ( 'LOP_COMMIT_XACT', 'LOP_ABORT_XACT' )

  1.                 OR ( [Operation] = 'LOP_BEGIN_XACT' /* and [Transaction SID]=SUSER_SID('') */ )

  1.               )

  1.               OR ( ( ( [Operation] IN ( 'LOP_INSERT_ROWS', 'LOP_DELETE_ROWS' )

  1.                        AND [Context] IN ( 'LCX_HEAP', 'LCX_CLUSTERED',

  1.                                           'LCX_MARK_AS_GHOST' )

  1.                      )

  1.                      OR ( [Operation] IN ( 'LOP_INSERT_ROWS', 'LOP_MODIFY_ROW' )

  1.                           AND [Context] = 'LCX_TEXT_MIX'

  1.                           AND DATALENGTH([RowLog Contents 0]) IN ( 0, 14, 28 )

  1.                         )

  1.                    )

  1.                    AND [PartitionId] IN ( 72057596166537216, 72057596166471680,

  1.                                           72057596166406144, 72057596327559168,

  1.                                           72057596160180224, 72057596361506816,

  1.                                           72057596119613440, 72057596119744512,

  1.                                           72057596119678976, 72057596120006656,

  1.                                           72057596119941120, 72057596120137728,

  1.                                           72057596545859584, 72057596119810048,

  1.                                           72057596231417856, 72057596418523136,

  1.                                           72057596441067520, 72057596381364224,

  1.                                           72057594562543616, 72057596104671232,

  1.                                           72057594585808896, 72057594585874432,

  1.                                           72057596242952192, 72057596168962048,

  1.                                           72057596054994944, 72057596055453696,

  1.                                           72057596035072000, 72057596055126016,

  1.                                           72057596091039744, 72057596381495296,

  1.                                           72057596381560832, 72057596524298240,

  1.                                           72057595958067200, 72057596469116928,

  1.                                           72057596462628864, 72057596454699008,

  1.                                           72057596241641472, 72057595958853632,

  1.                                           72057594563526656, 72057594563657728,

  1.                                           72057594563723264, 72057596502802432,

  1.                                           72057596484845568, 72057596484911104,

  1.                                           72057596575285248, 72057596554575872,

  1.                                           72057596485107712, 72057596485238784,

  1.                                           72057596485304320, 72057596485369856,

  1.                                           72057596551430144, 72057596485500928,

  1.                                           72057594601275392, 72057594621394944,

  1.                                           72057596548677632, 72057596561719296,

  1.                                           72057596218638336, 72057596376842240,

  1.                                           72057596357443584, 72057596357509120,

  1.                                           72057596358164480, 72057596112207872,

  1.                                           72057596023865344, 72057595959902208,

  1.                                           72057595961081856, 72057594588889088,

  1.                                           72057596112142336, 72057596410003456,

  1.                                           72057595938275328, 72057596192096256,

  1.                                           72057596192161792, 72057596367208448,

  1.                                           72057595961868288, 72057596245508096,

  1.                                           72057596250554368, 72057594565689344,

  1.                                           72057596192227328, 72057596192292864,

  1.                                           72057596248326144, 72057596248391680,

  1.                                           72057594565754880, 2465937948672,

  1.                                           72057596374810624, 72057594565885952,

  1.                                           72057596133113856, 72057596563357696,

  1.                                           48281791823872, 116258596192256,

  1.                                           72057596132851712, 72057595963179008,

  1.                                           72057596541861888, 72057594599047168,

  1.                                           53296886710272, 72057595944894464,

  1.                                           72057594566934528, 72057594567000064,

  1.                                           72057596526395392, 72057596526592000,

  1.                                           72057595964030976, 72057595965079552,

  1.                                           72057594582859776, 72057594567917568,

  1.                                           72057596525936640, 72057595908128768,

  1.                                           72057594568048640, 119223456956416,

  1.                                           72057594896711680, 72057594588758016,

  1.                                           72057596133179392, 72057596132786176,

  1.                                           72057595965931520, 72057595966455808,

  1.                                           72057596450177024, 72057595966849024,

  1.                                           112563398705152, 72057596184363008,

  1.                                           72057596184428544, 72057594681425920,

  1.                                           72057596309733376, 72057596205334528,

  1.                                           72057596184231936, 72057595458355200,

  1.                                           107370836852736, 72057595852423168,

  1.                                           72057595708702720, 72057596357312512,

  1.                                           72057596357378048, 72057596550119424,

  1.                                           72057596301279232, 72057596357050368,

  1.                                           72057596356984832, 72057596362293248,

  1.                                           72057596357574656, 72057596357246976,

  1.                                           72057596357181440, 72057596301344768,

  1.                                           72057595809890304, 72057595873591296,

  1.                                           72057595969011712, 72057595969536000,

  1.                                           72057596348858368, 72057595970191360,

  1.                                           72057596217917440, 72057596217982976,

  1.                                           72057596526329856, 72057596332212224,

  1.                                           114660558176256, 72057596526460928,

  1.                                           72057596331687936, 72057596331622400,

  1.                                           72057595970781184, 72057596574826496,

  1.                                           72057596317859840, 72057594572242944,

  1.                                           72057594592952320, 72057595971502080,

  1.                                           72057595991228416, 72057596324282368,

  1.                                           72057596220538880, 72057595972943872,

  1.                                           72057596512370688, 72057594640334848,

  1.                                           72057595973730304, 72057596132655104,

  1.                                           72057594573684736, 72057594574012416,

  1.                                           72057594776649728, 72057595974320128,

  1.                                           72057594574798848, 45591660199936,

  1.                                           72057594590920704, 72057595974778880,

  1.                                           72057594593738752, 72057595975106560,

  1.                                           72057595975696384, 72057595937882112,

  1.                                           140014173224960, 72057594576240640,

  1.                                           72057594576502784, 72057596501819392,

  1.                                           72057596188360704, 72057596526264320,

  1.                                           61775963815936, 56442625916928,

  1.                                           72057596350365696, 14271632703488,

  1.                                           72057596268838912, 72057596575744000,

  1.                                           72057596442836992, 72057596459089920,

  1.                                           72057596440281088, 72057596469444608,

  1.                                           72057596413935616, 72057596414001152,

  1.                                           72057596532293632, 72057596413739008,

  1.                                           72057596414066688, 72057596548743168,

  1.                                           72057596548612096, 72057596195110912,

  1.                                           72057596448014336, 72057594576961536,

  1.                                           72057594581614592, 72057594577354752,

  1.                                           72057596310061056, 72057596488384512,

  1.                                           72057594577813504, 72057596309995520,

  1.                                           72057596181151744, 72057594577551360 )

  1.                  )

  1.               OR ( [Operation] = 'LOP_HOBT_DDL' )

  1.             );

Operating system error 32(failed to retrieve text for this error. Reason: 15105)的更多相关文章

  1. 如何定位“Operating system error 32(failed to retrieve text for this error. Reason: 15105)”错误中被占用的文件

      之前在这篇"Operating system error 32(failed to retrieve text for this error. Reason: 15105)"博 ...

  2. DBCC CHECKDB 遭遇Operating system error 112(failed to retrieve text for this error. Reason: 15105) encountered

    我们一个SQL Server服务器在执行YourSQLDBa的作业YourSQLDba_FullBackups_And_Maintenance时遇到了错误: Exec YourSQLDba.Maint ...

  3. Write on ……… failed: 112(failed to retrieve text for this error. Reason: 15105)

    早上检查数据库的备份邮件时,发现一台Microsoft SQL Server 2008 R2 (SP2)数据库的Maintenance Report有错误 在SSMS里面执行Exec YourSQLD ...

  4. Error while trying to retrieve text for error ORA-01019 的解决办法

    这个问题涉及到 64 位的oracle服务, 和32位的客户端导致的问题. 环境如下: win8.1 + 64位oracle 11.1 做服务器, 客户端由于采用32位程序,不支持64位的oracle ...

  5. Oracle Error - "OCIEnvCreate failed with return code -1 but error message text was not available".

    ISSUE: When trying to connect to an Oracle database you receive the following error: "OCIEnvCre ...

  6. 终于解决了Linux下运行OCCI程序一直报Error while trying to retrieve text for error ORA-01804错误

    终于解决了Linux下运行OCCI程序一直报Error while trying to retrieve text for error ORA-01804错误 http://blog.csdn.net ...

  7. Error while trying to retrieve text for error ORA-12154

    问题描述:vs中调试运行没有任何错误,但是发布到IIS中访问,就会报以上错误.IIS不会调试,所以一头雾水,不止错误在哪里. 分析:看到网上有人分析了Web.config模拟验证的问题恍然大悟: 原文 ...

  8. Error while trying to retrieve text for error ORA-12705

    今天, 按照以前的学习笔记, 配置ProC 但是, 却发生了如题的错误. Google一下, 都是NLS_LANG环境变量设置有问题, 我核一下没有问题. 问题在哪? 原来是ORACLE_HOME环境 ...

  9. Oracle Error while trying to retrieve text for error ORA-01804

    我在Linux上编译C++程序,有这个错误. 本机情况: Linux上Oracle的安装情况,服务器上有两个Client版本.我在Makefile中使用了高版本的动态库. 原因: 1.首先排查下 tn ...

随机推荐

  1. PHP算法之二分查找

    二分查找: 数组必须有序,且不重复. 一般实际工作中,很少有这样的数组,所以应用的很少,但是思想很好. 1 // 二分查找 2 $array = [10,14,23,33,45,56,65,77,89 ...

  2. Spring Boot druid监控页添加登录访问权限(用户名+密码)

    需求 druid作为数据源的一名后起之秀,凭借其出色的性能,渐渐被大家使用.当然还有他的监控页面也有这非常大的作用.但是监控页面往往包含了很多隐私的数据信息,所以需要将其保密,所以可以为监控页面添加一 ...

  3. 【Docker】(6)---Dockerfile文件

    springboot项目打包镜像中的Dockerfile文件 在讲Dockerfile文件之前应该先讲下maven的一个插件叫:dockerfile-maven-plugin.他们是组合一起用的 一. ...

  4. oracle数据库默认是10次尝试失败后锁住用户

    一般数据库默认是10次尝试失败后锁住用户 1.查看FAILED_LOGIN_ATTEMPTS的值select * from dba_profiles: 2.修改为无限次(为安全起见,不建议使用)alt ...

  5. JQ 放大镜

     <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title> ...

  6. 服务器Windows 2008R2 C盘清理

    今天因为连服务器的时间慢了很多,然后看了一下C盘的空间,OMG剩下222K.然后一直上网找解决方案. 按照惯例,应该开一个360看看,C盘清理啊,搬家什么的.360告知的竟然是没有可以搬移的,所以,这 ...

  7. C语言中你可能不熟悉的头文件(stdlib.h)

    C语言中你可能不熟悉的头文件<cstdlib>(stdlib.h) C Standard General Utilities Library (header) C标准通用工具库(头文件) ...

  8. 【朝花夕拾】Android性能篇之(三)Java内存回收

    在上一篇日志([朝花夕拾]Android性能篇之(二)Java内存分配)中有讲到,JVM内存由程序计数器.虚拟机栈.本地方法栈.GC堆,方法区五个部分组成.其中GC堆是一块多线程的共享区域,它存在的作 ...

  9. mybatis中resultMap配置细则

    resultMap算是mybatis映射器中最复杂的一个节点了,能够配置的属性较多,我们在mybatis映射器配置细则这篇博客中已经简单介绍过resultMap的配置了,当时我们介绍了resultMa ...

  10. es6学习笔记--模板字符串

    这几天简单看了一下深入浅出es6这本书,感觉特实用,学习了一个新特性---模板字符串在项目开发中,拼接字符串是不可缺少的,动态创建dom元素以及js操作数据都要拼接字符串,在es6出来之前,我们都通常 ...