rac把数据文件创建在不共享的地方(四)

2014-11-24 17:04:10 · 作者: · 浏览: 9
th the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> select * from casd;
ID NAME
---------- --------------------
1 cc
OK 成功!!!
2,用rman恢复
1,注意使用rman备份数据文件的时候要在归档模式下
否则在备份的时候提示如下:
RMAN> backup datafile 7;
Starting backup at 25-APR-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=56 instance=racdb1 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 04/25/2013 17:03:37
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
要模拟这个案例笔者停了node1实例,然后mount 然后alter database archivelog;
结果提示:
SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-01126: database must be mounted in this instance and not open in any
instance
然后回到node2 把实例也停了,然后再回到node1
SQL> alter database archivelog;
Database altered.
然后执行backup
[oracle@rac1 tmp]$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Thu Apr 25 17:10:23 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: RACDB (DBID=808564626, not open)--这里我是在mount状态下连接的,当然也可以在open状态下
RMAN> backup datafile 7;
Starting backup at 25-APR-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=35 instance=racdb1 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/tmp/rman.dbf
channel ORA_DISK_1: starting piece 1 at 25-APR-13
channel ORA_DISK_1: finished piece 1 at 25-APR-13
piece handle=/u01/app/oracle/dbs/05o7vrob_1_1 tag=TAG20130425T171035 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 25-APR-13
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Full 17.67M DISK 00:00:16 25-APR-13
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20130425T162944
Piece Name: /u01/app/oracle/dbs/02o7vpbo_1_1
Control File Included: Ckp SCN: 1987592 Ckp time: 25-APR-13
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2 Full 1.10M DISK 00:00:01 25-APR-13
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20130425T171035
Piece Name: /u01/app/oracle/dbs/05o7vrob_1_1
List of Datafiles in backup set 2
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
7 Full 19