RAC 数据库数据库恢复数据文件显示为0

  1. 云栖社区>
  2. 博客>
  3. 正文

RAC 数据库数据库恢复数据文件显示为0

snowofsummer 2018-08-21 14:10:32 浏览1115
展开阅读全文

1,数据库异机恢复数据文件显示为0

解决方法:

CATALOG START WITH
SWITCH DATABASE TO COPY;

RMAN> report schema;
List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    0        SYSTEM               ***     +DATA/jmrac/datafile/system.274.983202761
2    0        SYSAUX               ***     +DATA/jmrac/datafile/sysaux.275.983202761
3    0        UNDOTBS1             ***     +DATA/jmrac/datafile/undotbs1.276.983202761
4    0        USERS                ***     +DATA/jmrac/datafile/users.277.983202761
5    0        EXAMPLE              ***     +DATA/orcl/datafile/example.285.983202859
6    0        UNDOTBS2             ***     +DATA/orcl/datafile/undotbs2.286.983203157

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    20       TEMP                 32767       +DATA/orcl/tempfile/temp.284.983202853



RMAN> 

RMAN> CATALOG START WITH '+DATA/orcl';

searching for all files that match the pattern +DATA/orcl

List of Files Unknown to the Database
=====================================
File Name: +data/ORCL/DATAFILE/SYSTEM.294.984744009
File Name: +data/ORCL/DATAFILE/SYSAUX.295.984744009
File Name: +data/ORCL/DATAFILE/EXAMPLE.277.984744009
File Name: +data/ORCL/DATAFILE/UNDOTBS1.276.984744009
File Name: +data/ORCL/DATAFILE/UNDOTBS2.275.984744009
File Name: +data/ORCL/DATAFILE/USERS.274.984744009

Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: +data/ORCL/DATAFILE/SYSTEM.294.984744009
File Name: +data/ORCL/DATAFILE/SYSAUX.295.984744009
File Name: +data/ORCL/DATAFILE/EXAMPLE.277.984744009
File Name: +data/ORCL/DATAFILE/UNDOTBS1.276.984744009
File Name: +data/ORCL/DATAFILE/UNDOTBS2.275.984744009
File Name: +data/ORCL/DATAFILE/USERS.274.984744009

RMAN> SWITCH DATABASE TO COPY;

datafile 1 switched to datafile copy "+DATA/orcl/datafile/system.294.984744009"
datafile 2 switched to datafile copy "+DATA/orcl/datafile/sysaux.295.984744009"
datafile 3 switched to datafile copy "+DATA/orcl/datafile/undotbs1.276.984744009"
datafile 4 switched to datafile copy "+DATA/orcl/datafile/users.274.984744009"
datafile 5 switched to datafile copy "+DATA/orcl/datafile/example.277.984744009"
datafile 6 switched to datafile copy "+DATA/orcl/datafile/undotbs2.275.984744009"

RMAN> report schema;
List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    810      SYSTEM               ***     +DATA/orcl/datafile/system.294.984744009
2    690      SYSAUX               ***     +DATA/orcl/datafile/sysaux.295.984744009
3    95       UNDOTBS1             ***     +DATA/orcl/datafile/undotbs1.276.984744009
4    36       USERS                ***     +DATA/orcl/datafile/users.274.984744009
5    330      EXAMPLE              ***     +DATA/orcl/datafile/example.277.984744009
6    50       UNDOTBS2             ***     +DATA/orcl/datafile/undotbs2.275.984744009

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    20       TEMP                 32767       +DATA/orcl/tempfile/temp.284.983202853

网友评论

登录后评论
0/500
评论
snowofsummer
+ 关注