In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Problem description: use scn number to recover mistakenly deleted data
1. Query the SCN value flashed by the system and the SCN value of the current log. Because mine is a test and the table created is in the back, so the SCN value is greater than the following two SCN values, so it is of no use for me to recover the data. If the data I created is before the following two SCN values, that is, less than the SCN values at these two time points, I can use these two scn to recover the data, but the test table I created in the next experiment is later. I can't do it.
SQL > select dbms_flashback.get_system_change_number from dual
SQL > select current_scn from v$database
two。 Create test data
SQL > create table aa (id int,name varchar2 (10), adress varchar2 (10))
SQL > insert into aa 2 values (111 mr.stevender mr.beijing`)
SQL > commit
3. At this time, it is equivalent to the data has been created, and the scn number after that should be known, because the above two scn numbers do not record the information of this table is of no use to me. If I query the current_scn number now, I will not bother to test here. The documentation is for reference.
SQL > select dbms_flashback.get_system_change_number from dual
This scn value can be used to recover data.
4. Delete the data simulation scenario, and then the data cannot be queried.
SQL > delete from aa;1 row deleted.SQL > commit;Commit complete.
5. Recover data
SQL > select * from aa as of scn 1116916
The previous data of this scn value can be queried and can be used to recover.
SQL > insert into sys.aa select * from sys.aa as of scn 1116916
Restore it now.
Summary
The above is the delete mistakenly deleted data introduced by the editor to you using the SCN number to restore, I hope it will be helpful to you, if you have any questions, please leave me a message, the editor will reply to you in time. Thank you very much for your support to the website!
If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank 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: 264
*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.