• SQLSERVER事务日志备份


    一、场景:

    事务日志备份计划失败日志文件:**
    Microsoft(R) Server Maintenance Utility (Unicode) Version 10.50.1600
    Report was generated on "10.2.2.112".
    Maintenance Plan: LogBackup
    Duration: 00:00:14
    Status: Warning: One or more tasks failed.
    Details:
    Back Up Database (Transaction Log) (10.2.2.112)
    Backup Database on Local server connection
    Databases: AIS20140721160444
    Type: Transaction Log
    Append existing
    Task start: 2018-11-26T18:00:02.
    Task end: 2018-11-26T18:00:16.
    Failed:(-1073548784) Executing the query "BACKUP LOG [AIS20140721160444] TO DISK = N'E:\KD_..." failed with the following error: "Write on "E:\KD_SQL_BAK\LogBackup\AIS20140721160444\AIS20140721160444_backup_2018_11_26_180002_4974166.trn" failed: 112(failed to retrieve text for this error. Reason: 15105)
    Write on "E:\KD_SQL_BAK\LogBackup\AIS20140721160444\AIS20140721160444_backup_2018_11_26_180002_4974166.trn" failed: 112(failed to retrieve text for this error. Reason: 15105)
    BACKUP LOG is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

    Command:EXECUTE master.dbo.xp_create_subdir N''E:KD_SQL_BAKLogBackupAIS20140721160444''

    GO
    BACKUP LOG [AIS20140721160444] TO DISK = N''E:KD_SQL_BAKLogBackupAIS20140721160444AIS20140721160444_backup_2018_11_26_180002_4974166.trn'' WITH RETAINDAYS = 5, NOFORMAT, NOINIT, NAME = N''AIS20140721160444_backup_2018_11_26_180002_4964165'', SKIP, REWIND, NOUNLOAD, STATS = 10
    GO
    declare @backupSetId as int
    select @backupSetId = position from msdb..backupset where database_name=N''AIS20140721160444'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''AIS20140721160444'' )
    if @backupSetId is null begin raiserror(N''Verify failed. Backup information for database ''''AIS20140721160444'''' not found.'', 16, 1) end
    RESTORE VERIFYONLY FROM DISK = N''E:KD_SQL_BAKLogBackupAIS20140721160444AIS20140721160444_backup_2018_11_26_180002_4974166.trn'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND

    GO
    二、环境:WINDOWSERVER2008R2+SQLSERVER2008R2 英文版本
    三、解决步骤
    1.查看数据库实体的事务日志文件达到60G.
    2.数据库服务器曾经发生断电故障,可能由此造成日志文件Dirty
    3. 处理方法:
    USE AIS20140721160444;
    GO

    -- 1)Truncate the log by changing the database recovery model to SIMPLE.

    ALTER DATABASE AIS20140721160444 SET RECOVERY SIMPLE;

    GO

    --2) Shrink the trun cated log file to 1 MB.

    DBCC SHRINKFILE (SCM102SP2_log, 10);
    GO

    -- 3)Reset the database recovery model.

    ALTER DATABASE AIS20140721160444 SET RECOVERY FULL;
    GO
    4. 重新运行事务日志备份作业,结果成功

    ---恢复内容结束---

  • 相关阅读:
    转:图嵌入 (Graph Embedding) 和图神经网络 (Graph Neural Network)
    转:pytorch框架下—GCN代码详细解读
    图神经网络GNN:给图多个 node features和edge features
    图神经网络GNN:创建图和展示图
    图卷积神经网络GCN:整图分类(含示例及代码)
    转:zip(*args)解压运算
    图卷积神经网络GCN系列二:节点分类(含示例及代码)
    Pycharm远程连接服务器(或者docker)
    认证和授权(Authentication和Authorization)
    HttpContext.Current为NULL
  • 原文地址:https://www.cnblogs.com/24Key/p/10057040.html
Copyright © 2020-2023  润新知