12C-OCP升级1z-060-006

Your multitenant container database, CDB1, is running in ARCHIVELOG mode and has
two pluggable databases, HR_PDB and ACCOUNTS_PDB. An RMAN backup exists for
the database.
You issue the command to open ACCOUNTS_PDB and find that the USERDATA.DBF
data file for the default permanent tablespace USERDATA belonging to ACCOUNTS_PDB
is corrupted.
What should you do before executing the commands to restore and recover the data file in
ACCOUNTS_PDB?
A. Place CDB1 in the mount stage and then the USERDATA tablespace offline in
ACCOUNTS_PDB.
B. Place CDB1 in the mount stage and issue the ALTER PLUGGABLE DATABASE
accounts_pdb CLOSE IMMEDIATE command.
C. Issue the ALTER PLUGGABLE DATABASE accounts_pdb RESTRICTED command.
D. Take the USERDATA tablespace offline in ACCOUNTS_PDB.

Answer: D

整个的恢复过程:

10:55:07 sys@prodcdb> create table test tablespace userdata as select * from dba_users;
create table test tablespace userdata as select * from dba_users
                                                       *
ERROR at line 1:
ORA-01110: data file 17: '/u01/app/oracle/oradata/prodcdb/accounts_pdb/userdata01.dbf'
ORA-01116: error in opening database file 17
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
10:55:25 sys@prodcdb> alter tablespace userdata offline;
Tablespace altered.

[10:54:20 oracle(db)@kiwi ~]$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Mon Mar 14 10:56:13 2016
Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
connected to target database: PRODCDB (DBID=2898423651)
RMAN> restore datafile 17;
Starting restore at 14-MAR-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=26 device type=DISK
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 00017 to /u01/app/oracle/oradata/prodcdb/accounts_pdb/userdata01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/product/11.2.0/db/dbs/09r0evna_1_1
channel ORA_DISK_1: piece handle=/u01/app/oracle/product/11.2.0/db/dbs/09r0evna_1_1 tag=TAG20160314T104146
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 14-MAR-16
RMAN> recover datafile 17;
Starting recover at 14-MAR-16
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:00
Finished recover at 14-MAR-16

10:57:11 sys@prodcdb>  alter tablespace userdata online;
Tablespace altered.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值