In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "oracle how to restore DML mistakenly deleted data according to the internal SCN number", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "oracle how to restore DML mistakenly deleted data according to the internal SCN number" this article.
The following example is tested by yourself:
1. Create a temporary table:
SQL > create table t as select * from dba_tables
Table created.
SQL > select count (1) from t
COUNT (1)
-
2734
2. Check the current SCN number.
SQL > select dbms_flashback.get_system_change_number fscn from dual
FSCN
-
1730685
You can also view historical scn numbers by time:
Select name,FIRST_CHANGE# fscn,NEXT_CHANGE# nscn,FIRST_TIME from v$archived_log
13641588409883
3. Delete data from the table:
SQL > delete from t
2734 rows deleted.
SQL > commit
Commit complete.
SQL > select count (1) from t
COUNT (1)
-
0
4. Query the data of historical SCN number
SQL > select count (*) from t as of scn 1730685
COUNT (*)
-
2734
You can query under the historical SCN number, and the number of t table is 2734.
5. Restore the data of T table:
SQL > insert into t select * from t as of scn 1730685
2734 rows created.
SQL > commit
Commit complete.
SQL > select count (1) from t
COUNT (1)
-
2734
OK, through the above simple example, we can find a relatively simple way to recover data.
And this method does not need to be run in flashback mode. But you can only use DML operation. If a truncate operation occurs in the table, it cannot be recovered.
In addition, this method is similar to flashback.
The above is all the contents of the article "how to recover DML erased data according to the internal SCN number of oracle". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more 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.
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.