ORACLE 12C uses Rman for table recovery

Source: Internet
Author: User



Rman can perform db,tablespace,datafile,block level and TSPITR recovery in previous versions of 12C, 12C introduces table-level recovery
A single table can be recovered without opening the flashback.

example, create a table


Sql> alter session set CONTAINER=PDB2;

Session altered.

Sql> CREATE TABLE Frank.t1 as SELECT * from Dba_tables;

Table created.


Backing Up the database

rman> backup Database;

Starting backup at 16-jan-14
Allocated Channel:ora_disk_1
Channel ora_disk_1:sid=265 Device Type=disk
Channel ora_disk_1:starting full DataFile backup set
Channel ora_disk_1:specifying DataFile (s) in backup set
Input datafile file number=00003 name=/u01/app/oracle/oradata/c12/sysaux01.dbf
Input datafile file number=00001 name=/u01/app/oracle/oradata/c12/system01.dbf
Input datafile file number=00004 name=/u01/app/oracle/oradata/c12/undotbs01.dbf
Input datafile file number=00038 name=/home/oracle/t1.dbf
Input datafile file number=00006 name=/u01/app/oracle/oradata/c12/users01.dbf
Input datafile file number=00014 name=/u01/app/oracle/product/12.1.0/db_1/dbs/test

....................

Query the SCN number of the current database

Sql> select Current_scn from V$database;

Current_scn
-----------
4898443


sql> drop table frank.t1;


[Email protected] ~]$ MKDIR/HOME/ORACLE/ABC


rman> Recover table Frank.t1 of pluggable database pdb2
2> until SCN 4898443
3> auxiliary destination '/HOME/ORACLE/ABC '
4> datapump destination '/home/oracle/abc ';

Starting recover at 16-jan-14
Using channel Ora_disk_1
Rman-05026:warning:presuming following set of tablespaces applies to specified Point-in-time

List of tablespaces expected to has UNDO segments
Tablespace SYSTEM
Tablespace UNDOTBS1

Creating automatic instance, with Sid= ' vewd '

Initialization parameters used for automatic instance:
Db_name=c12
Db_unique_name=vewd_pitr_pdb2_c12
compatible=12.1.0.0.0
db_block_size=8192
db_files=200
sga_target=1g
Processes=80
Diagnostic_dest=/u01/app/oracle
Db_create_file_dest=/home/oracle/abc
log_archive_dest_1= ' LOCATION=/HOME/ORACLE/ABC '
Enable_pluggable_database=true
_clone_one_pdb_recovery=true
#No Auxiliary parameter file used


Starting up automatic instance C12

Oracle instance started

Total System Global area 1068937216 bytes

Fixed Size 2296576 bytes
Variable Size 281019648 bytes
Database buffers 780140544 bytes
Redo buffers 5480448 bytes
Automatic instance Created

Contents of Memory Script:

..............................................................


It also creates a new auxiliary instance, then does a full-library restore on auxiliary instance and then exports and imports through the DataPump tool
The whole process is very similar to the TSPITR.

Recovery successfully queried again


Sql> Select COUNT (*) from FRANK.T1;

COUNT (*)
----------
2318

Note the name of the common User reference table is "C # #frank". T1, instead of "C # #frank. T1", the following error is reported
rman> Recover Table "C # #frank. T1" until SCN 4894140 auxiliary destination '/home/oracle/abc ' datapump destination '/hom E/oracle/abc ';

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE, STACK follows ===============
RMAN-00571: ===========================================================
Rman-00558:error encountered while parsing input commands
Rman-01009:syntax error:found "until": Expecting one of: "Dot"
Rman-01007:at Line 1 column File:standard input


ORACLE 12C uses Rman for table recovery

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.