QUESTION NO: 353
True or false: tablespace point-in-time recovery is possible only with RMAN.
A. True
B. False
【题目示意】
此题考查有关于recover tablespace的相关知识。
【解析】
恢复表空间可以用RMAN进行恢复,也可以手工备份,手动恢复。
【实验】
1)查看USERS表空间所包含的文件
SYS@ENMOEDU > select file_id,file_name,tablespace_name from dba_data_files;
FILE_ID FILE_NAME TABLESPACE_NAME
----------------------------------------------------------------------------------
1 /u01/app/oracle/oradata/ENMOEDU/system01.dbf SYSTEM
2 /u01/app/oracle/oradata/ENMOEDU/sysaux01.dbf SYSAUX
3 /u01/app/oracle/oradata/ENMOEDU/undotbs01.dbf UNDOTBS1
4 /u01/app/oracle/oradata/ENMOEDU/users01.dbf USERS
2)将表空间处于热备状态
SYS@ENMOEDU > alter tablespace USERS begin backup;
Tablespace altered.
3)备份表空间
SYS@ENMOEDU > !cp /u01/app/oracle/oradata/ENMOEDU/users01.dbf /home/oracle/users01.dbf
4)结束热备状态
SYS@ENMOEDU > alter tablespace USERS end backup;
Tablespace altered.
5)删除文件,以制造故障
SYS@ENMOEDU > !rm -rf /u01/app/oracle/oradata/ENMOEDU/users01.dbf
6)手工恢复数据文件
SYS@ENMOEDU > shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@ENMOEDU > startup
ORACLE instance started.
Total System Global Area 422670336 bytes
Fixed Size 1345380 bytes
Variable Size 331352220 bytes
Database Buffers 83886080 bytes
Redo Buffers 6086656 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
ORA-01110: data file 4: '/u01/app/oracle/oradata/ENMOEDU/users01.dbf'
SYS@ENMOEDU > !mv /home/oracle/users01.dbf /u01/app/oracle/oradata/ENMOEDU/
SYS@ENMOEDU > exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ENMOEDU ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Feb 5 18:53:24 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SYS@ENMOEDU > recover datafile '/u01/app/oracle/oradata/ENMOEDU/users01.dbf';
Media recovery complete.
7)打开数据库
SYS@ENMOEDU > alter database open;
Database altered.
【小结】
RMAN可以恢复数据文件,也可以手动恢复数据文件,因此选择B
【答案】 B
相关参考
http://docs.oracle.com/cd/E11882_01/backup.112/e10642/osbackup.htm#BRADV490
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29435844/viewspace-1078491/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29435844/viewspace-1078491/