天天看點

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 [email protected]> 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 [email protected]> 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 [email protected]>  alter tablespace userdata online;
Tablespace altered.
           

繼續閱讀