In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
In versions prior to 12C, rman can restore at db,tablespace,datafile,block level and TSPITR level, while 12C introduces table level recovery.
You can restore a single table when flashback is not open.
For example, create a table
SQL > alter session set container=pdb2
Session altered.
SQL > create table frank.t1 as select * from dba_tables
Table created.
Backup 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
[oracle@o12c ~] $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 have 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:
...
Also create a new auxiliary instance, then do a full library restore on auxiliary instance and then export and import through the datapump tool
The whole process is very similar to TSPITR.
Query again after successful recovery
SQL > select count (*) from frank.t1
COUNT (*)
-
2318
Note that the name of the common user reference table is "c##frank" .t1, not "c##frank.t1", otherwise the following error will be reported
RMAN > recover table "c##frank.t1" until scn 4894140 auxiliary destination'/ home/oracle/abc' datapump destination'/ home/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 29 file: standard input
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.