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

The realization method of Oracle flashing and retrieving data

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

Share

Shulou(Shulou.com)06/01 Report--

Flashback technology is part of the powerful database backup and recovery mechanism of Oracle. Flashback technology can provide fast and minimal loss recovery when logical errors occur in the database (most flashback functions can be done when the database is online). It should be noted that flashback technology is designed to quickly recover logic errors, but flashback technology is useless for errors caused by physical damage or media loss, and you still have to rely on some advanced backup and recovery tools of Oracle, such as RAMN (this is the essence of Oracle's powerful backup and recovery mechanism).

Flashback technology is used to realize automatic backup and restore based on flashback recovery area on disk.

1. Restore table objects

1. Create a student table

Create table STUDENT (idno INTEGER, name VARCHAR2 (30), sex VARCHAR2 (30))

two。 Add record

Insert into student (IDNO, NAME, SEX) values (1,'Li Yunli', 'female'); insert into student (IDNO, NAME, SEX) values (2, 'Wang Qiang', 'male'); insert into student (IDNO, NAME, SEX) values (3, 'Zhang Wei', 'male')

3. Delete tabl

Drop table student

4. There is a new record in the database recycling station.

Select object_name,original_name, type from user_recyclebin;// system table select * from "BIN$GWPY3LiiRD6R43mb5j3gXg==$0"; / / student alias FLASHBACK TABLE student TO BEFORE DROP;// recovery table in the Recycle Bin

Second, retrieve the table data

1. Delete a table record according to a condition, such as

Delete from student where idno='2';commit

two。 If you delete or modify the data in it, you can first create a quick table to find the data in the state before the deletion and modification.

CREATE TABLE QUICK_TABLE ASSELECT * FROM student AS OF TIMESTAMP to_date ('2018-09-15 1111 yyyy-mm-dd hh34:mi' 50', 'yyyy-mm-dd hh34:mi')

3.QUICK_TABLE data

Summary

The above is the realization method of Oracle flash data recovery introduced by the editor to you. I hope it will be helpful to you. If you have any questions, you are welcome to leave a message. The editor will reply you in time!

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