Author :? SHOUG Member-ORACLEACS senior consultant Luo Min had a technical exchange with Oracle colleagues at a mobile company one day, covering 12c, Cloud technology, database integration, Disaster Tolerance, OEM, and other topics. Around noon, the FLASHBACK Technology best suited for manual error recovery was sprayed on Oracle. Suddenly received
Author :? SHOUG Member-oracle acs senior consultant Luo Min had a technical exchange with Oracle colleagues at a mobile company one day, covering 12c, Cloud technology, database integration, Disaster Tolerance, OEM and other topics. Around noon, the FLASHBACK Technology best suited for manual error recovery was sprayed on Oracle. Suddenly received
Author :?
SHOUG Member-oracle acs senior consultant Luo Min
One day, I had technical exchanges with Oracle colleagues in a mobile company, covering 12c, Cloud technology, database integration, Disaster Tolerance, OEM, and other topics. Around noon, the FLASHBACK Technology best suited for manual error recovery was sprayed on Oracle. Just as the customer suddenly received a call from the DBA: "Luo Gong, can we suspend technical exchange? We have three tables that have just been accidentally deleted, could you come and help me rescue the three tables with the FLASHBACK Technology you just introduced?"
Why are there such coincidences in the world? I have no choice but to hesitate, especially for any selfish distractions. For example, "Luo Gong, this doesn't just show you the technical features of Oracle, and you will be given a chance to show your face .". "Luo Gong, can't you blow it? See if you can show what you actually learned "... .... As a result, I started my laptop and went straight to the scene. While I went downstairs, I quickly read FLASHBACK related information. As the saying goes: It's not easy to get a gun. Haha.
Sales colleagues also saw the pressing situation and Lao Luo's "Embarrassment", and tried every possible means to help: help me remove the notebook power cord, help me carry mineral water, and even hate to help me read the document, comrade Luo walked down the stairs together. Haha!
By the time I got to the machine, I had read the materials and had a bottom in my mind. Therefore, after a simple query, let the DBA of a third-party company enter the following command:
SELECT original_name, object_name,
Type, ts_name, droptime, related, space
FROM user_recyclebin
WHERE can_undrop = 'yes ';
Why is it empty? Enter the following information under the sys User:
Select * from dba_recyclebin;
Still blank! What's going on? Does it mean that the customers who delete these three tables are not accidental operations, but are sincerely destructive and use "drop table... Purge command, or cleared the Recycle Bin to completely delete the three tables? Further confirmation with the customer: The three tables were deleted by mistake and the above command was not used.
In this case, why is there no data in these three tables in the recycle bin? Think about it! Oracle also has a RECYCLEBIN parameter to control whether to use flashback drop. Check it out! Originally, DBA set RECYCLEBIN to OFF, thus disabling the flashback drop function. Alas! Sorry, Comrade Luo lost a chance to show his face and Oracle lost a chance to show technical characteristics!
You can use "flashback table To before drop "is a simple command that restores the accidentally deleted table in seconds, causing the customer to re-capture data from the production system, it took more than an hour to restore deleted indexes, Constraint, and other data. Fortunately, the customer said: thanks to the data in the production system, it would not be possible to call the day.
When everything is back to normal, I still asked the DBA: "Why should we disable the FLASHBACK DROP function ?" The answer is: "Your Oracle Flashback consumes too much resources and affects performance. We dare not open it ."
Oh, it turns out so. This is also the topic of this article: Technically, Flashback is not a single technology, but a technology cluster. The following is a comprehensive comparison of various Flashback technologies:
Flashback Technology |
Main Purpose |
Level |
Configuration method |
Technical Principles |
Recovery Period |
Applicable scenarios |
Flashback Database |
Quick database recovery |
Database-level |
Based on the Flashback log stored in the Flashback Recovery Area |
Depends on the Flashback Recovery Area capacity and the db_flashback_retention_target parameter. |
- Large-scale data misoperations
- Application Testing
- Comprehensive use with Data Guard
|
Flashback Table |
Restore the whole table to a specified time |
Table-level |
Default |
Based on Undo Technology |
The UNDO_retention parameter depends on the size of the UNDO tablespace. |
- Table-level recovery with various DML errors
|
Flashback Query/DBMS_FLASHBACK package |
Query records from past time points |
Record level |
Default |
Based on Undo Technology |
The UNDO_retention parameter depends on the size of the UNDO tablespace. |
- Restore error records
- Analysis and statistics of historical records
|
Flashback Drop |
Quickly restore the Drop Table operation |
Table-level |
Default |
Recyclebin (the tablespace of the table) |
Automatic Management (FIFO algorithm ). Determined by the free space of the tablespace |
- Error Drop table operation
|
Flashback Versions Query |
Access transaction history |
Record level |
Default |
Based on Undo Technology |
The UNDO_retention parameter depends on the size of the UNDO tablespace. |
- Access transaction history
- Security Audit
|
Flashback Transaction Query |
Query UNDO statements |
Record level |
Default |
Based on Undo Technology |
The UNDO_retention parameter depends on the size of the UNDO tablespace. |
- Query transaction details
- Query UNDO_ SQL statements
|
11g Total-Recall (Flashback Data Archive) |
Storage and utilization of historical data |
Table-level |
Configuration required |
Based on FDA Region |
Depends on the size of the table space in the FDA Region |
- Persistent storage of historical data
- Analysis and statistics of historical data
- Security Audit
|
Have you seen this? In the above table, the technical principles, objectives, default configurations, and applicable scenarios of each Flashback are different. Yes, some Flashback technologies, especially the Flashback Database, need to be specially configured. For example, creating the Flashback Recovery Area will also generate a large number of Flashback logs, which indeed has a certain impact on the performance. However, many Flashback technologies are configured by default. On the other hand, they are based on the Undo technology and do not produce additional resource overhead. The impact on performance is also very limited. For example, the Flashback Drop technology only performs certain operations when deleting a Table. Is there a daily Drop Table operation in our system? Are you okay to delete tables every day? No way, huh, huh.
Alas, this is one of the norm of the domestic IT industry: indiscriminate use; simple technology use; one-size-fits-all; lack of in-depth research on related technologies; no new features can be used; to scare yourself ......
IT is time for us to truly be rigorous, scientific, pragmatic, professional, positive, enterprising, fully evaluate and boldly use all kinds of IT new technologies and new features?
Alas .....................
Related posts:
- Oracle Acs senior consultant Luo minoluo core technical sentiment: Niu! Automatic Optimization of 11 GB and SQL Profile
- Oracle Acs senior consultant Luo minoluo technology core sentiment: automatic scanning of SQL statement tools?
- Oracle Acs senior consultant Luo minoluo's core technical sentiment: the sentiment after the show
- Oracle Acs senior consultant Luo minoluo core technical sentiment: Table sharding or partition?
- Oracle Acs senior consultant Luo minoluo core technical sentiment: Is Clusterware a mature product?
- Explanation of Oracle flash back function flashback
- Enhanced flash back data archiving in 11g r2
- V $ sqlcommand SQL opcodes and names
- Information segment sections recorded in the Oracle Controlfile Control File
Original article address: Oracle Acs senior consultant Luo minoluo core technology sentiment: lost a face show opportunity, thanks to the original author for sharing.