In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "what is the testing method of Oracle flashback database". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1 set the flashback directory and size
SQL > show parameter recoverSQL > alter system set db_recovery_file_dest_size=5g;SQL > alter system set db_recovery_file_dest='/fast_recovery' SQL > show parameter recoverNAME TYPE VALUE---db_recovery_file_dest string / fast_recoverydb_recovery_file_dest_size big integer 5Gdb_unrecoverable_scn_tracking boolean TRUErecovery_parallelism integer 0
2 enable flashback
SQL > select flashback_on from vested databases: FLASHBACKONMYEN NOSQL > alter database flashback on;Database altered.SQL > select flashback_on from vested databases
3 viewing time
SQL > alter session set nls_date_format='yyyy-mm-dd hh34:mi:ss';Session altered.SQL > select oldest_flashback_scn,oldest_flashback_time from vested flashbackdatabases databases log potential OLDESTD flashbacks flashbacks SCN OLDEST_FLASHBACK_TI--1114453 2020-06-24 08:30:49
4 create test data
SQL > conn cjc/cjcSQL > create table test1 as select * from dba_objects;SQL > select count (*) from test1; COUNT (*)-87002
5 create a flashback point
SQL > create restore point test1; Restore point created.
6 View flashback points
SQL > set line 200SQL > col time for a50 SQL > col restore_point_time for a20SQL > alter session set nls_date_format='yyyy-mm-dd hh34:mi:ss';SQL > select scn,time,restore_point_time,name from v$restore_point SCN TIME RESTORE_POINT_TIME NAME-- -1114756 24-JUN-20 08.36.20.000000000 AM TEST1
7 continue to insert data
SQL > ho dateWed Jun 24 08:39:31 CST 2020SQL > insert into test1 select * from test1;87002 rows created.SQL > commit;Commit complete.SQL > select count (*) from test1; COUNT (*)-174004
8 delete the table
SQL > drop table test1 purge;Table dropped.SQL > select count (*) from cjc.test1;select count (*) from cjc.test1 * ERROR at line 1:ORA-00942: table or view does not exist
9 flashback database
-test1 is the name of the flashback point set earlier
SQL > conn / as sysdbaSQL > shutdown immediateSQL > startup mountSQL > flashback database to restore point test1;Flashback complete.SQL > alter database open resetlogs
10 View the data and restore the database to the flashback point
SQL > select count (*) from cjc.test1; COUNT (*)-87002
11 View flashback data
[oracle@cjcos01 flashback] $pwd/fast_recovery/CJCDB01/ flashback [oracle @ cjcos01 flashback] $ll-rthtotal 101m oracle oinstall 51m Jun r-1 RW Jun 24 08:30 o1mm oracle oinstall Jun h67ow2w. FLB RW Israel r-1 51m Jun 24 08:49 o1_mf_hh67osvt_.flb
12 turn off flashback, flashback log is automatically deleted
This is the end of SQL > alter database flashback off;Database altered.SQL > select flashback_on from vault database transaction [oracle@cjcos01 flashback] $ls "what is the test method of Oracle flashback database". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.