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

简介:
Rac数据库恢复之后,数据库文件名称改变,恢复就的控制文件之后,数据库不能识别之前已经恢复的数据库文件。
RMAN> CATALOG START WITH '+DATA/orcl';
RMAN> SWITCH DATABASE TO COPY;

#####################
#####################


RMAN> restore controlfile from '/soft/cont_bak_0dtb3vab_1_1.bak';

Starting restore at 21-AUG-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=26 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/cntrlorcl1.dbf
Finished restore at 21-AUG-18

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

RMAN> report schema;   《==========旧的数据文件信息,存储在控制文件。
List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    810      SYSTEM               ***     +DATA/jmrac/datafile/system.274.983202761
2    690      SYSAUX               ***     +DATA/jmrac/datafile/sysaux.275.983202761
3    95       UNDOTBS1             ***     +DATA/jmrac/datafile/undotbs1.276.983202761
4    36       USERS                ***     +DATA/jmrac/datafile/users.277.983202761
5    330      EXAMPLE              ***     +DATA/orcl/datafile/example.295.984743873
6    50       UNDOTBS2             ***     +DATA/orcl/datafile/undotbs2.294.984743873

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

RMAN> restore database;

Starting restore at 21-AUG-18
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to +DATA/jmrac/datafile/system.274.983202761
channel ORA_DISK_1: restoring datafile 00002 to +DATA/jmrac/datafile/sysaux.275.983202761
channel ORA_DISK_1: restoring datafile 00003 to +DATA/jmrac/datafile/undotbs1.276.983202761
channel ORA_DISK_1: restoring datafile 00004 to +DATA/jmrac/datafile/users.277.983202761
channel ORA_DISK_1: restoring datafile 00005 to +DATA/orcl/datafile/example.295.984743873
channel ORA_DISK_1: restoring datafile 00006 to +DATA/orcl/datafile/undotbs2.294.984743873
channel ORA_DISK_1: reading from backup piece /soft/back_0btb3v8h_1_1_ORCL.bak
channel ORA_DISK_1: piece handle=/soft/back_0btb3v8h_1_1_ORCL.bak tag=TAG20180821T114625
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
Finished restore at 21-AUG-18

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

RMAN> 


========================
如果在次重新恢复控制文件:
RMAN> restore controlfile from '/soft/cont_bak_0dtb3vab_1_1.bak';

Starting restore at 21-AUG-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=26 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/cntrlorcl1.dbf
Finished restore at 21-AUG-18

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;

RMAN-06139: WARNING: control file is not current for REPORT SCHEMA
Report of database schema for database with db_unique_name ORCL

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
相关文章
|
2月前
|
存储 Oracle 关系型数据库
oracle数据恢复—Oracle数据库文件大小变为0kb的数据恢复案例
存储掉盘超过上限,lun无法识别。管理员重组存储的位图信息并导出lun,发现linux操作系统上部署的oracle数据库中有上百个数据文件的大小变为0kb。数据库的大小缩水了80%以上。 取出&并分析oracle数据库的控制文件。重组存储位图信息,重新导出控制文件中记录的数据文件,发现这些文件的大小依然为0kb。
|
3月前
|
存储 数据挖掘 数据库
数据库数据恢复—SQLserver数据库ndf文件大小变为0KB的数据恢复案例
一个运行在存储上的SQLServer数据库,有1000多个文件,大小几十TB。数据库每10天生成一个NDF文件,每个NDF几百GB大小。数据库包含两个LDF文件。 存储损坏,数据库不可用。管理员试图恢复数据库,发现有数个ndf文件大小变为0KB。 虽然NDF文件大小变为0KB,但是NDF文件在磁盘上还可能存在。可以尝试通过扫描&拼接数据库碎片来恢复NDF文件,然后修复数据库。
|
6月前
|
存储 负载均衡 Oracle
|
6月前
|
存储 Oracle 关系型数据库
|
8月前
|
SQL 存储 数据挖掘
数据库数据恢复—数据库ndf文件大小变为0KB的数据恢复案例
存储设备损坏导致存储中SQL Server数据库崩溃。对数据库文件进行恢复后,用户发现有4个ndf文件的大小变为0KB。该SQL Server数据库每10天生成一个大小相同的NDF文件,该SQL Server数据库包含两个LDF文件。
|
存储 Oracle 关系型数据库
oracle数据库 修改表空间数据文件大小,优化存储
oracle数据库 修改表空间数据文件大小,优化存储
|
Linux
修改phpMyAdmin导入数据库文件大小限制的解决方法
默认phpMyAdmin数据库文件导入大小限制为2M,那么大文件如何导入phpMyAdmin呢?码笔记分享phpMyAdmin导入数据库文件大小限制的解决方法: 修改phpMyAdmin导入数据库文件大小的方法 phpMyAdmin导入文件大小是通过upload_max_filesize和post_max_size来控制的,phpMyAdmin会判断upload_max_filesize和post_max_size两个配置的较小值项作为导入数据库文件大小限制的有效值,所以要修改导入文件大小,这两个配置参数都要修改。
1670 0
|
存储 SQL Oracle
请参考rhel7 安装 oracle 18c rac(03 dbca 建立数据库)
rhel7 安装 oracle 18c rac(01 grid软件安装) dbca 建立数据库。
3253 0
|
数据库
RAC 数据库数据库恢复数据文件显示为0
RAC数据库异机恢复数据文件显示为0
1511 0