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 standby database flashed back to the day before to retrieve the mistakenly deleted data.

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

Share

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

Because the developer deleted a piece of data at 4: 00 a.m. on July 9, now there is a problem with the transaction. You need to check the status of the data at that time. The history table does not store this data. Now use the standby database to flash back to the point in time before deletion to retrieve the data.

At that time, there was no record of the operation, so only the operation process was written.

1. Check the time of support flashback:

Select oldest_flashback_scn os, to_char (oldest_flashback_time,'YYYYMMDD hh34:mi:ss') ot

Retention_target rt,flashback_size fs, estimated_flashback_size es

From v$flashback_database_log

two。 Check the relationship between time and scn. To determine the flashback time, you need to restore to 3: 00 a. M. on July 9.

Select scn,to_char (time_dp,'yyyy-mm-dd hh34:mi:ss') from sys.smon_scn_time order by scn

4.3532E+10 2019-07-09 02:59:13

4.3533E+10 2019-07-09 03:04:16

4.3533E+10 2019-07-09 03:04:18

-start the operation-

3. Cancel the application of preparing database log

Alter database recover managed standby database cancel

4. Flashback the database to around 3: 00.

FLASHBACK DATABASE TO TIMESTAMP TO_DATE ('20190709 02VOLV 59RU 13MMDD HH24:MI:SS')

-wait.-A large amount of data in the database takes a long time.

5. Open the library after completion, and open the library in read-only mode:

Alter database open read only

Find the data at that time

Select * from tbl_tfr_trn_log j

Where j. Keyword rspinner 20190708195739162200'

Then find the data and export it.

7.

Alter database recover managed standby database using current logfile disconnect from session

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