- 论坛徽章:
- 0
|
本帖最后由 zhangmq 于 2011-04-13 17:13 编辑
回复 1# zhangmq
恢复脚本:
[oracle@rheloracle ~]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Tue Apr 12 01:35:20 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: RACDB (DBID=744895673, not open)
RMAN> run {
2> allocate channel ch1 device type 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=node1),SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so';
3> set newname for datafile 1 to '/u01/oracle/oradata/orcl/system.dbf';
4> set newname for datafile 2 to '/u01/oracle/oradata/orcl/undotbs1.dbf';
5> set newname for datafile 3 to '/u01/oracle/oradata/orcl/sysaux.dbf';
6> set newname for datafile 4 to '/u01/oracle/oradata/orcl/undotbs2.dbf';
7> set newname for datafile 5 to '/u01/oracle/oradata/orcl/users.dbf';
8> SQL "ALTER DATABASE RENAME FILE ''+RAC_DISK/racdb/onlinelog/group_1.257.747278919'' TO ''/u01/oracle/oradata/orcl/redo01.log''";
9> SQL "ALTER DATABASE RENAME FILE ''+RAC_DISK/racdb/onlinelog/group_2.258.747278921'' TO ''/u01/oracle/oradata/orcl/redo02.log''";
10> SQL "ALTER DATABASE RENAME FILE ''+RAC_DISK/racdb/onlinelog/group_3.265.747284047'' TO ''/u01/oracle/oradata/orcl/redo03.log''";
11> SQL "ALTER DATABASE RENAME FILE ''+RAC_DISK/racdb/onlinelog/group_4.266.747284049'' TO ''/u01/oracle/oradata/orcl/redo04.log''";
12> RESTORE database;
13> switch datafile all;
14> recover database;
15> RELEASE CHANNEL c1;
16> } |
|