我们的DR sybase解决方案基于完全备份的恢复,然后从主站点转储事务日志。sybase是一个旧版本: an 15.0,但是该解决方案不起作用。在恢复完整备份(没有错误)之后,事务日志的恢复失败(说数据库上执行了一个活动)。我认为,因为在完全备份的恢复之后,序列被破坏了:
数据库_checkpoint=(2511803,20),first=(2511803,20),last=(2511900,1)。
有人能帮我理解我为什么会有这种行为吗?
用于还原db的命令如下:
load database db_warehouse from "/dumps/sybase/db_warehouse_20191215010001.dmp
预先感谢P
发布于 2019-12-17 16:40:50
我对自己做了一些分析,并调试了用于恢复数据库和事务日志的脚本。
第一步是使用load命令恢复数据库的转储。在收到100%的load命令后,在load命令的输出下面
Backup Server: 3.42.1.1: LOAD is complete (database db_warehouse).
Started estimating recovery log boundaries for database 'db_warehouse'.
Database 'db_warehouse', checkpoint=(2511803, 20), first=(2511803, 20), last=(2511900, 1).
Completed estimating recovery log boundaries for database 'db_warehouse'.
Started ANALYSIS pass for database 'db_warehouse'.
Completed ANALYSIS pass for database 'db_warehouse'.
Started REDO pass for database 'db_warehouse'. The total number of log records to process is 1315.然后是大量的滚动和执行的结束,我有:
Redo pass of recovery has processed 145 committed and 0 aborted transactions.
Completed REDO pass for database 'db_warehouse'.
Use the ONLINE DATABASE command to bring this database online; ASE will not bring it online automatically.因此,一切看起来都很好,数据库仍然处于脱机状态,如下所示:
name dbid suid status version logptr crdate dumptrdate status2 audflags deftabaud defvwaud defpraud def_remote_type def_remote_loc status3 status4 audflags2
------------------------------ ------ ----------- ------ ------- ----------- ----------------------- ----------------------- ------- ----------- ----------- ----------- ----------- --------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ----------- ----------- ----------------------------------
db_warehouse 8 1 12 1 2510827 2019-12-16 22:28:44.006 2019-12-14 23:50:00.866 16 0 0 0 0 NULL NULL 131072 0 NULL 然后,使用相同的脚本加载事务日志,第一件事是检查数据库是否脱机。在此检查期间,将执行以下查询:
SELECT CONVERT(int, lct_admin('logsegment_freepages', db_id('db_warehouse')))此查询返回以下错误:
Msg 921, Level 14, State 2
Server 'SYBASE_WAREHOUSE', Line 1
Database 'db_warehouse' has not been recovered yet - please wait and try again.
-----------
0为什么这个查询会返回这个错误?唯一的解决方案是将db放到网上,但是事务日志还原失败(在db中有一个活动,然后序列不再匹配)。
谢谢P
https://stackoverflow.com/questions/59365508
复制相似问题