ORACLE表备份恢复测试用例

更新时间:2023-10-28 11:04:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

1. 准备工作在ORACLE中创建表

SQL> create table test(name char(8),age int); Table created.

SQL> select * from test; no rows selected

SQL> insert into test values('aaa',22); 1 row created. SQL> commit; Commit complete.

SQL> select * from test; NAME AGE -------- ---------- aaa 22

2. 准备工作在安腾普管理控制台创建Oracle备份应用

?

添加ORACLE相关参数,包括ORACLE_HOME、ORALE_SID软件库文件等

?

如果填写的各项参数都正确,点ORACLE应用图标右键还原和归档管理器就能展开ORACLE数据库结构如下

?

定义ORACLE备份的介质池

?

在作用管理器中可以查看ORACLE备份结果

3. 进行ORACLE表备份恢复测试

?

恢复前将数据库的表drop

SQL> drop table test; Table dropped.

SQL> conn /as sysdba Connected.

SQL> shutdown immediate; Database closed.

Database dismounted.

ORACLE instance shut down. SQL>

?

进入还原和归档管理器,启动还原操作

?

数据库还原后,对数据库进行recover

SQL> startup mount;

ORACLE instance started.

Total System Global Area 5010685952 bytes Fixed Size 2212936 bytes Variable Size 3221228472 bytes Database Buffers 1744830464 bytes Redo Buffers 42414080 bytes Database mounted.

SQL> recover database using backup controlfile until cancel;

ORA-00279: change 1040140 generated at 03/04/2015 02:54:36 needed for thread 1 ORA-00289: suggestion : /u01/app/11.2.0/arch/1_11_873425412.dbf ORA-00280: change 1040140 for thread 1 is in sequence #11

Specify log: {=suggested | filename | AUTO | CANCEL}

ORA-00279: change 1040340 generated at 03/04/2015 02:55:15 needed for thread 1 ORA-00289: suggestion : /u01/app/11.2.0/arch/1_12_873425412.dbf ORA-00280: change 1040340 for thread 1 is in sequence #12

ORA-00278: log file '/u01/app/11.2.0/arch/1_11_873425412.dbf' no longer needed for this recovery

Specify log: {=suggested | filename | AUTO | CANCEL} Log applied.

Media recovery complete. SQL>

SQL> alter database open resetlogs; Database altered.

4. 检查还原的数据

SQL> conn zwh/zwh Connected.

SQL> select * from test; NAME AGE -------- ---------- aaa 22

SQL>

本文来源:https://www.bwwdw.com/article/1he2.html

Top