WEB开发网
开发学院数据库Oracle 建repository存放的表空间和rman用户 阅读

建repository存放的表空间和rman用户

 2008-09-09 12:55:02 来源:WEB开发网   
核心提示: (4) 恢复日志文件RMAN> run {2> set archivelog destination to '/export/home/oracle/admin/test/arch';3> allocate channel d1 type disk;4&g

(4) 恢复日志文件

RMAN> run {
2> set archivelog destination to '/export/home/oracle/admin/test/arch';
3> allocate channel d1 type disk;
4> restore archivelog all;
5> release channel d1;
6> }

会把所有的日志文件恢复。

(5) 根据日志做recover

$svrmgrl
Oracle Server Manager Release 3.1.6.0.0 - Production
Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved.
Oracle8i Enterprise Edition Release 8.1.6.0.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.6.0.0 - Production
SVRMGR> connect internal
Connected.
SVRMGR> recover database using backup controlfile until cancel;
ORA-00279: change 51054 generated at 06/11/2000 11:38:37 needed for thread 1
ORA-00289: suggestion : /export/home/oracle/admin/test/arch/arch_1_3.arc
ORA-00280: change 51054 for thread 1 is in sequence #3
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
Log applied.
ORA-00279: change 51058 generated at 06/11/2000 11:38:44 needed for thread 1
ORA-00289: suggestion : /export/home/oracle/admin/test/arch/arch_1_4.arc
ORA-00280: change 51058 for thread 1 is in sequence #4
ORA-00278: log file '/export/home/oracle/admin/test/arch/arch_1_3.arc' no longer
needed for this recovery
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
Log applied.
ORA-00279: change 51074 generated at 06/11/2000 11:40:20 needed for thread 1
ORA-00289: suggestion : /export/home/oracle/admin/test/arch/arch_1_5.arc
ORA-00280: change 51074 for thread 1 is in sequence #5
ORA-00278: log file '/export/home/oracle/admin/test/arch/arch_1_4.arc' no longer
needed for this recovery
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel
Media recovery cancelled.
SVRMGR> alter database open resetlogs;
Statement processed.

恢复完成。

SVRMGR> select table_name from user_tables;
TABLE_NAME
------------------------------
BONUS
DEPT
EMP
SALGRADE
TEST
TEST_ZMY
ZMY
ZMY_DEPT
ZMY_EMP
9 rows selected.

可以检查看到,所有的都恢复了,包括全备份后的事务。(只要有归档日志,都可以恢复)。

3、 恢复后rman数据库的同步

$rman rcvcat rman_hainan/rman_hainan@rman target /
Recovery Manager: Release 8.1.6.0.0 - Production
RMAN-06005: connected to target database: TEST (DBID=1692992254)
RMAN-06008: connected to recovery catalog database
RMAN> reset database;
RMAN-03022: compiling command: reset
RMAN-03023: executing command: reset
RMAN-08006: database registered in recovery catalog
RMAN-03023: executing command: full resync
RMAN-08029: snapshot controlfile name set to default value: ?/dbs/snapcf_@.f
RMAN-08002: starting full resync of recovery catalog
RMAN-08004: full resync complete

上一页  1 2 3 4 5 

Tags:repository 存放 空间

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接