Check patentability & draft patents in minutes with Patsnap Eureka AI!

Protection method for oracle database truncate operation

A database and data technology, applied in database indexing, structured data retrieval, etc., can solve the problems of time-consuming and labor-intensive recovery, effective protection without Truncate, data loss, etc., and achieve the effect of simple and fast recovery

Active Publication Date: 2022-02-11
SHANGHAI SNC NET INFORMATION TECH CO LTD
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] 2. The operation and maintenance personnel accidentally executed the Truncate command and made a wrong operation, resulting in the complete deletion of data
If the amount of data is very large, this recovery process may take several days, which will seriously affect the normal operation of some customers
[0007] 2. There is no full backup or archive. If this kind of data is truncated and you want to retrieve it, you can only use the underlying recovery tools: such as DUL, ODU, AUL and other tools
very complex operation
[0008] It can be seen from the above that there is currently no effective protection for truncate. Once a truncate operation occurs, the data may be completely lost. Even if it can be restored, it will be extremely time-consuming and labor-intensive.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Protection method for oracle database truncate operation
  • Protection method for oracle database truncate operation
  • Protection method for oracle database truncate operation

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0017] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0018] figure 1 It is a flow chart of the Truncate operation protection of the Oracle database of the present invention.

[0019] See figure 1 , the protection method that the present invention provides for Oracle database Truncate operation comprises the steps:

[0020] S1) when the Truncate operation occurs in the Oracle database, a trigger is set; the trigger record is deleted by the Truncate table name, and the recorded information is saved in the beforetruncate table;

[0021] S2) regularly scan the beforetruncate table, if there is a newly deleted table, then perform query dba_segments to find the segment header block of the table;

[0022] S3) Execute the script to modify the relevant data_object_id of the table to the value before Truncate, and generate a reverse script modified back at the same time;

[0023] S4) After reaching the preset p...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a protection method for Oracle database Truncate operation, comprising the following steps: S1) when a Truncate operation occurs in the Oracle database, a trigger is set to record the name of the table deleted by Truncate and stored in the beforetruncate table; S2) Regularly scan the beforetruncate table, if there is a newly deleted table, then query to find the section header block of the table; S3) modify the relevant id of the table to the value before Truncate, and generate a reverse script for modifying back at the same time; S4) when reaching the predetermined After setting the protection threshold, run the reverse script to restore the identification to the situation after Truncate, and clean up the data that needs to be recycled through the Oracle database. The invention makes the restoration of the Truncate simple and fast without affecting normal data deletion.

Description

technical field [0001] The invention relates to an Oracle database processing method, in particular to a protection method for Oracle database Truncate operation. Background technique [0002] During the operation of the database system, the following situations often occur: [0003] 1. The amount of data suddenly increased, and the customer had no storage space. Now the storage space needs to be cleared. After communication, it was found that the data of a table can be completely deleted, so the Truncate deletion method was used (delete in Oracle is slower and will generate a large number of archive). After the deletion, it is found that the data is still useful and needs to be retrieved. [0004] 2. The operation and maintenance personnel accidentally executed the Truncate command and made a wrong operation, resulting in the complete deletion of data. [0005] At present, there is generally no way in the industry to avoid this kind of situation. The only way is to creat...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/22
Inventor 程永新孙玉颖袁伟翔
Owner SHANGHAI SNC NET INFORMATION TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More