如何通过RMAN恢复?

发布于 2024-08-20 05:27:19 字数 616 浏览 3 评论 0原文

我想通过 RMAN 备份并删除 scott.dept 然后再次恢复所有内容。 (这是为了测试 RMAN 机制)

我是这样写的:

1)rman target sys/manager@db

2)in sql*plus
   shutdown immediate;
   startup mount exclusive;
   ALTER DATABASE ARCHIVELOG;

2)CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'g:\db\db_cf%F';

3)BACKUP DATABASE PLUS ARCHIVELOG;

4)alter database open;

5)drop scott.dept

6)in sql*plus
   shutdown immediate;
   startup mount exclusive;
   ALTER DATABASE ARCHIVELOG;

7)Restore Database;

8)Recover Database;

最后它向我显示:成功完成

但 scott.dept 尚未恢复;为什么? 谢谢 ...

I want to backup via RMAN and delete scott.dept and again restore everything. (this is for testing RMAN mechanism)

I wrote like this :

1)rman target sys/manager@db

2)in sql*plus
   shutdown immediate;
   startup mount exclusive;
   ALTER DATABASE ARCHIVELOG;

2)CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'g:\db\db_cf%F';

3)BACKUP DATABASE PLUS ARCHIVELOG;

4)alter database open;

5)drop scott.dept

6)in sql*plus
   shutdown immediate;
   startup mount exclusive;
   ALTER DATABASE ARCHIVELOG;

7)Restore Database;

8)Recover Database;

At the end it shows me : successfully completed .

but scott.dept not restore yet; why?
Thanks ...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风情万种。 2024-08-27 05:27:19

如果你完全康复了,那就是我所期望的结果。

当您恢复并向 RMAN 提供所有未完成的归档日志时,会对数据库应用 DROP SCOTT.DEPT 操作。

您希望将时间点恢复到发出 DROP 语句之前的时间。

rman target sys/manager@db 

RUN
{
  SET UNTIL TIME 'Feb 3 2010 08:30:00'; 
  RESTORE CONTROLFILE ;
  ALTER DATABASE MOUNT; 
  RESTORE DATABASE;
  RECOVER DATABASE;
}

更多信息请点击这里:
Oracle 10.2 备份和恢复基础知识 - 执行数据库点-时间恢复

或者,您可以关闭“恢复数据库”步骤,只恢复数据库,然后执行“打开重置日志”。这将允许您跳过在存档日志中应用任何更改。

If you did a full recovery then that is the result I would expect.

The DROP SCOTT.DEPT action was applied do the database when you recovered and fed RMAN all the outstanding archived logs.

You want to do a point in time recovery to a time before you issued the DROP statement.

rman target sys/manager@db 

RUN
{
  SET UNTIL TIME 'Feb 3 2010 08:30:00'; 
  RESTORE CONTROLFILE ;
  ALTER DATABASE MOUNT; 
  RESTORE DATABASE;
  RECOVER DATABASE;
}

More info here:
Oracle 10.2 Backup and Recovery Basics - Performing Database Point-In-Time Recovery

ALternately you could leave the RECOVER DATABASE step off and just RESTORE the database followed by an OPEN RESETLOGS. That would allow you to skip applying any changes in the Archived Logs.

凉宸 2024-08-27 05:27:19

如果您想恢复所有内容,则无需提及时间点

startup nomount

run {
restore controflile from 'path';
SQL 'ALTER DATABASE MOUNT';
restore database;
recover database;
}

IF you want to restore everything then no need to mention point-in-time

startup nomount

run {
restore controflile from 'path';
SQL 'ALTER DATABASE MOUNT';
restore database;
recover database;
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文