Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How RMAN restores drop purge's tables

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces RMAN how to restore the drop purge table, the article is very detailed, has a certain reference value, interested friends must read it!

@ ORA12C > alter session set nls_date_format='yyyy-mm-dd hh34:mi:ss';Session altered.SYS@ORA12C > create table tweak 0920 as select * from dba_objects;Table created.SYS@ORA12C > select count (*) from tweak 0920; COUNT (*)-916911 row selected.SYS@ORA12C > select sysdate from dual SYSDATE-2015-09-20 14 drop table 14V 17V 491 row selected.SYS@ORA12C > drop table tweets 0920 purge;Table dropped.SYS@ORA12C > desc tweets 0920 True 0920 does not existSYS@ORA12C > create table tweets 09201 as select * from dba_objects;Table created.SYS@ORA12C > select count (*) from tweets 09201; COUNT (*)-916911 row selected.SYS@ORA12C > shutdown immediate Database closed.Database dismounted.ORACLE instance shut down.SYS@ORA12C > startup mount;ORACLE instance started.Total System Global Area 729808896 bytesFixed Size 2928680 bytesVariable Size 570429400 bytesDatabase Buffers 150994944 bytesRedo Buffers 5455872 bytesDatabase mounted.

Now we need to restore the tweak 0920 table:

Run {sql "alter session set nls_date_format=''yyyy-mm-dd hh34:mi:ss''"; set until time '2015-09-20 14 alter session set nls_date_format=''yyyy-mm-dd hh34:mi:ss'' 17 purl 49 Tibetan database;recover database 6 >} using target database control file instead of recovery catalogsql statement: alter session set nls_date_format=''yyyy-mm-dd hh34:mi:ss''executing command: SET until clauseStarting restore at 20-SEP-15allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=355 device type=DISKcreating datafile file number=2 name=/u01/app/oracle/oradata/ORA12C/t2.dbfchannel ORA_DISK_1: starting datafile backup set restorechannel ORA_DISK_1: specifying datafile (s) to restore from backup setchannel ORA_DISK_1: restoring datafile 00001 to / U01/app/oracle/oradata/ORA12C/system01.dbfchannel ORA_DISK_1: restoring datafile 00003 to / u01/app/oracle/oradata/ORA12C/sysaux01.dbfchannel ORA_DISK_1: restoring datafile 00004 to / u01/app/oracle/oradata/ORA12C/undotbs01.dbfchannel ORA_DISK_1: restoring datafile 00005 to / u01/app/oracle/oradata/ORA12C/example01.dbfchannel ORA_DISK_1: restoring datafile 00006 to / u01/app/oracle/oradata/ORA12C/users01.dbfchannel ORA_DISK_1: reading from backup piece / U01/app/oracle/fast_recovery_area/ORA12C/backupset/2015_09_20/o1_mf_nnndf_TAG20150920T120820_bzwd9ntd_.bkpchannel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/ORA12C/backupset/2015_09_20/o1_mf_nnndf_TAG20150920T120820_bzwd9ntd_.bkp tag=TAG20150920T120820channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete Elapsed time: 00:01:56Finished restore at 20-SEP-15Starting recover at 20-SEP-15using channel ORA_DISK_1starting media recoveryarchived log for thread 1 with sequence 18 is already on disk as file / u01/app/oracle/fast_recovery_area/ORA12C/archivelog/2015_09_20/o1_mf_1_18_bzwh058r_.arcarchived log for thread 1 with sequence 19 is already on disk as file / u01/app/oracle/fast_recovery_area/ORA12C/archivelog/2015_09_20/o1_mf_1_ 19_bzwhh60d_.arcarchived log for thread 1 with sequence 20 is already on disk as file / u01/app/oracle/fast_recovery_area/ORA12C/archivelog/2015_09_20/o1_mf_1_20_bzwhzsts_.arcarchived log for thread 1 with sequence 1 is already on disk as file / u01/app/oracle/fast_recovery_area/ORA12C/archivelog/2015_09_20/o1_mf_1_1_bzwmprks_.arcarchived log file name=/u01/app/oracle/fast_recovery_area/ORA12C/ Archivelog/2015_09_20/o1_mf_1_18_bzwh058r_.arc thread=1 sequence=18archived log file name=/u01/app/oracle/fast_recovery_area/ORA12C/archivelog/2015_09_20/o1_mf_1_19_bzwhh60d_.arc thread=1 sequence=19archived log file name=/u01/app/oracle/fast_recovery_area/ORA12C/archivelog/2015_09_20/o1_mf_1_20_bzwhzsts_.arc thread=1 sequence=20archived log file name=/u01/app/oracle/fast_recovery_area/ORA12C/ Archivelog/2015_09_20/o1_mf_1_1_bzwm5k1c_.arc thread=1 sequence=1archived log file name=/u01/app/oracle/fast_recovery_area/ORA12C/archivelog/2015_09_20/o1_mf_1_1_bzwmprks_.arc thread=1 sequence=1media recovery complete Elapsed time: 00:00:07Finished recover at 20-SEP-15RMAN > alter database open resetlogs Statement processed

Validation: the twee0920 table has been restored, and the twee09201 table no longer exists.

SYS@ORA12C > select count (*) from tweets 0920; COUNT (*)-916911 row selected.SYS@ORA12C > select count (*) from tweets 09201X select count (*) from tweets 09201 * ERROR at line 1:ORA-00942: table or view does not exist is all the contents of this article "how to recover the drop purge Table of RMAN". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report