AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / dba / 问题 / 125226
Accepted
Craig Efrein
Craig Efrein
Asked: 2016-01-06 03:30:11 +0800 CST2016-01-06 03:30:11 +0800 CST 2016-01-06 03:30:11 +0800 CST

RESTORE FROM URL 在数据库恢复期间终止

  • 772

尝试从 Azure BLOB 还原小型备份

RESTORE DATABASE MY_DATABASE FROM  URL = 'https://somelocation.blob.core.windows.net/mydatabase.bak' 
WITH FILE=1
,MOVE N'MY_DATABASE'TO N'D:\DATA\MY_DATABASE.mdf'
,MOVE N'MY_DATABASE_log'TO N'D:\LOG\MY_DATABASE_log.ldf'
,NOUNLOAD,  REPLACE,  STATS = 2, CREDENTIAL = 'somecredential'

在大约 98% 的某个地方,恢复就死了

86 percent processed.
88 percent processed.
90 percent processed.
92 percent processed.
94 percent processed.
96 percent processed.
98 percent processed.
Msg 3013, Level 16, State 1, Line 8
RESTORE DATABASE is terminating abnormally.

这是带有跟踪标志的日志输出

2016-01-08 08:59:52.780 spid63  RestoreDatabase: Database MY_DATABASE
2016-01-08 08:59:52.790 spid63  Opening backup set
2016-01-08 08:59:52.790 spid63  VDI: "C:\Program Files\Microsoft SQL Server\MSSQL12.DATA\MSSQL\Binn\BackupToUrl.exe" "r" "p" "680074007400700073003A002F002F006B0039003900730074006F003000300032002E0062006C006F0062002E0063006F00720065002E00770069006E0064006F00770073002E006E00650074002F006B0030003100730071006C002D0063006C0075002D0032002F004C005F0043004100540041004C004F0047005F00430044004900530043004F0055004E0054005F004D004900440044004C00450043004D0053005F0032003000310036005F00300031005F00300033005F003000310030003300350038002E00620061006B00" "6B0039003900730074006F00300030003200" "01000000D08C9DDF0115D1118C7A00C04FC297EB010000007D2AFDE19FCC3F4FBB113683EF29D7B5000000001200000061007A007500720065006B0065007900000003660000C000000010000000ED978F2ACEBB06BA73899E4D62DCEED10000000004800000A000000010000000FC5DAF946420975518E0336799E9FA2F48000000A5B7746C13945ABD05048D8CE67E8ACCF4A429616B12B1C1FBAA7B6C0AC4F8466F63644135D0C88F6DBA6D76BB18A550B81C15005FB538B4EA3C109B91549E3DE8872F460703247F14000000EE9427440D53CEEF53072D911D1CF92CA7BC1A2B" "NOFORMAT" "4C005F0043004100540041004C004F004700" "D:\DATA\SYSTEM\MSSQL12.DATA\MSSQL\Log" "DB" "54004500530054005F004D004900440044004C00450043004D005300" "NOTRACE"
2016-01-08 08:59:52.790 spid63  BackupToUrl process initiated with PID: 17796, for database name [MY_DATABASE]
2016-01-08 09:00:12.410 spid63  SetTargetRestoreAge: 0
2016-01-08 09:00:12.410 spid63  Restore: Configuration section loaded
2016-01-08 09:00:12.410 spid63  Restore: Backup set is open
2016-01-08 09:00:12.410 spid63  Restore: Planning begins
2016-01-08 09:00:12.440 spid63  Halting FullText crawls on database MY_DATABASE
2016-01-08 09:00:12.440 spid63  Dismounting FullText catalogs
2016-01-08 09:00:12.440 spid63  X-locking database: MY_DATABASE
2016-01-08 09:00:12.440 spid63  Restore: Planning complete
2016-01-08 09:00:12.450 spid63  Restore: BeginRestore (offline) on MY_DATABASE
2016-01-08 09:00:12.760 spid63  Restore: PreparingContainers
2016-01-08 09:00:14.210 spid63  Restore: Containers are ready
2016-01-08 09:00:14.210 spid63  Zeroing D:\DATA\MY_DATABASE_8.ldf from page 1 to 295800 (0x2000 to 0x906f0000)
2016-01-08 09:00:14.260 spid63  Restore: Restoring backup set
2016-01-08 09:00:14.260 spid63  Restore: Transferring data to MY_DATABASE
2016-01-08 09:01:14.370 spid63  Zeroing completed on D:\DATA\MY_DATABASE_8.ldf
2016-01-08 09:01:14.370 spid63  Zeroing D:\DATA\MY_DATABASE_log2.ldf from page 1 to 295800 (0x2000 to 0x906f0000)
2016-01-08 09:01:18.950 spid63  Restore: Waiting for log zero on MY_DATABASE
2016-01-08 09:02:16.370 spid63  Zeroing completed on D:\DATA\MY_DATABASE_log2.ldf
2016-01-08 09:02:16.370 spid63  Zeroing D:\DATA\MY_DATABASE_log3.ldf from page 1 to 295800 (0x2000 to 0x906f0000)
2016-01-08 09:03:15.440 spid63  Zeroing completed on D:\DATA\MY_DATABASE_log3.ldf
2016-01-08 09:03:15.440 spid63  Zeroing D:\DATA\MY_DATABASE_log4.ldf from page 1 to 295800 (0x2000 to 0x906f0000)
2016-01-08 09:04:13.620 spid63  Zeroing completed on D:\DATA\MY_DATABASE_log4.ldf
2016-01-08 09:04:13.620 spid63  Zeroing D:\DATA\MY_DATABASE_log5.ldf from page 1 to 244456 (0x2000 to 0x775d0000)
2016-01-08 09:05:06.270 spid63  Zeroing completed on D:\DATA\MY_DATABASE_log5.ldf
2016-01-08 09:05:06.270 spid63  FileHandleCache: 0 files opened. CacheSize: 14
2016-01-08 09:05:06.480 spid63  Resuming any halted fulltext crawls

如果备份成功完成,我会在全文爬网消息之后看到这一行

2016-01-08 08:53:38.720 spid63  Restore: Writing history records
2016-01-08 08:53:38.720 Backup  Database was restored: Database: MY_DATABASE_log5, creation date(time): 2014/12/10(22:04:35), first LSN: 71976:92071:1, last LSN: 71976:100304:1, number of dump devices: 1, device information: (FILE=1, TYPE=URL: {'https://somelocation.blob.core.windows.net/MY_DATABASE_2016_01_08_010437.bak'}). Informational message. No user action required.

至于错误信息,我发现了这个

将数据库备份到磁盘或磁带或从磁盘或磁带还原数据库时出现错误消息:“3266”、“3013”

RESTORE VERIFYONLY 成功完成。

来自同一位置的其他数据库还原已成功完成。在服务器本地还原同一备份工作正常。由于超过 1000 个 VLF,需要永远恢复。

日志中的唯一信息是这个

使用 PID 启动的 BackupToUrl 进程:4632,数据库名称 [MY_DATABASE]

为什么恢复数据库失败而不是只恢复验证?

如果这是由下载时间非常慢引起的问题,是否会在某处出现超时错误?

我现在认为问题是由大量 VLF 引起的,并且会话可能仍然以某种方式依赖于与 Azure 的 blob 存储的连接。

sql-server sql-server-2014
  • 1 1 个回答
  • 704 Views

1 个回答

  • Voted
  1. Best Answer
    Craig Efrein
    2016-01-09T01:19:24+08:002016-01-09T01:19:24+08:00

    为永久解决此问题,Microsoft 的支持提供了两种选择。

    安装 SQL Server 2014 SP1 + CU4

    或者

    安装 SQL Server 2014 CU7

    修复:无法在 Microsoft Azure 二进制大对象存储服务中还原 SQL Server 2012 或 2014 数据库

    当 SQL Server 2012 或 SQL Server 2014 数据库包含大型事务日志文件时,您无法在 Microsoft Azure 二进制大型对象 (BLOB) 存储服务中还原数据库。例如,如果事务日志文件太大,需要 3 分钟以上的时间才能恢复,则无法恢复数据库。

    另一种方法是缩小 ldf(s),从而减少数据库启动期间要恢复的 VLF 的数量。

    • 1

相关问题

  • SQL Server - 使用聚集索引时如何存储数据页

  • 我需要为每种类型的查询使用单独的索引,还是一个多列索引可以工作?

  • 什么时候应该使用唯一约束而不是唯一索引?

  • 死锁的主要原因是什么,可以预防吗?

  • 如何确定是否需要或需要索引

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目

    • 12 个回答
  • Marko Smith

    如何让sqlplus的输出出现在一行中?

    • 3 个回答
  • Marko Smith

    选择具有最大日期或最晚日期的日期

    • 3 个回答
  • Marko Smith

    如何列出 PostgreSQL 中的所有模式?

    • 4 个回答
  • Marko Smith

    列出指定表的所有列

    • 5 个回答
  • Marko Smith

    如何在不修改我自己的 tnsnames.ora 的情况下使用 sqlplus 连接到位于另一台主机上的 Oracle 数据库

    • 4 个回答
  • Marko Smith

    你如何mysqldump特定的表?

    • 4 个回答
  • Marko Smith

    使用 psql 列出数据库权限

    • 10 个回答
  • Marko Smith

    如何从 PostgreSQL 中的选择查询中将值插入表中?

    • 4 个回答
  • Marko Smith

    如何使用 psql 列出所有数据库和表?

    • 7 个回答
  • Martin Hope
    Jin 连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目 2014-12-02 02:54:58 +0800 CST
  • Martin Hope
    Stéphane 如何列出 PostgreSQL 中的所有模式? 2013-04-16 11:19:16 +0800 CST
  • Martin Hope
    Mike Walsh 为什么事务日志不断增长或空间不足? 2012-12-05 18:11:22 +0800 CST
  • Martin Hope
    Stephane Rolland 列出指定表的所有列 2012-08-14 04:44:44 +0800 CST
  • Martin Hope
    haxney MySQL 能否合理地对数十亿行执行查询? 2012-07-03 11:36:13 +0800 CST
  • Martin Hope
    qazwsx 如何监控大型 .sql 文件的导入进度? 2012-05-03 08:54:41 +0800 CST
  • Martin Hope
    markdorison 你如何mysqldump特定的表? 2011-12-17 12:39:37 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 对 SQL 查询进行计时? 2011-06-04 02:22:54 +0800 CST
  • Martin Hope
    Jonas 如何从 PostgreSQL 中的选择查询中将值插入表中? 2011-05-28 00:33:05 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 列出所有数据库和表? 2011-02-18 00:45:49 +0800 CST

热门标签

sql-server mysql postgresql sql-server-2014 sql-server-2016 oracle sql-server-2008 database-design query-performance sql-server-2017

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve