码迷,mamicode.com
首页 > 数据库 > 详细

[TroubleShooting] The remote copy of database xx has not been rolled forward to a point in time

时间:2014-04-30 22:15:38      阅读:414      评论:0      收藏:0      [点我收藏+]

标签:sql   database   

Steps:

1. backup database TestMirror on Pricipal server

2. backup database log of TestMirror on Pricipal server

3. copy db and log backup files to Mirror server

4. restore db with norecovery

5. restore log with norecovery

6. create endpoints on both Pricipal serverand Mirror server

 

Issue:

If you use sql command or Mirror wizard to set mirror machine.

It will show error: "The remote copy of database "DBmirrorTest" has not been rolled forward to a point in time that is encompassed in the local copy of the database log."

Or

mamicode.com,码迷

1.  ALTERDATABASETestBackup01SETPARTNER=‘TCP://isrv04.xxx:50221‘;

2. Tasks -> Mirror ->Mirroring -> Config Security

 

Solutions:

RESTORE DATABASE @dbname FROM DISK = @backupfile WITH FILE = 1, NORECOVERY, NOUNLOAD;
RESTORE LOG @dbname FROM DISK = @backupfile WITH FILE = 2, NORECOVERY, NOUNLOAD;


These did the trick for me. I generated the commands through the "Script"-menu within the "Restore Database"-dialog of the Management Studio, because enabling mirroring was no problem when I restored through the "Restore Database"-dialog. My manually written SQL-commands were missing the "NOUNLOAD" part.

 

 

[TroubleShooting] The remote copy of database xx has not been rolled forward to a point in time

标签:sql   database   

原文地址:http://blog.csdn.net/wzhiu/article/details/24734089

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!