Unlock instant, AI-driven research and patent intelligence for your innovation.

Flash-back processing method and device for database and electronic equipment

A processing method and database technology, applied in the computer field, can solve problems such as inaccurate database flashback processing, database modification, truncated table database operation errors, etc.

Pending Publication Date: 2022-05-06
CHINA TELECOM CLOUD TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, for modification operations such as truncated tables, since the database modification content corresponding to this operation cannot be determined from the operation log, recovery of truncated tables is generally given up by default.
The flashback processing of the database is not accurate, and the loss of the truncated table may also cause database-related operation errors

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
  • Flash-back processing method and device for database and electronic equipment
  • Flash-back processing method and device for database and electronic equipment
  • Flash-back processing method and device for database and electronic equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0035] see figure 1 A flashback processing method for a database is illustrated, and the method includes the following steps:

[0036] S101. Acquire a first operation instruction at a first moment.

[0037]Wherein, the first operation instruction is used to instruct the user to modify the database; the first operation instruction includes a truncate statement for truncating the first table in the database. The truncate statement can also be described as a truncate table statement, which is a structured query language (SQL) statement, which can be recorded as TRUNCATE TABLE XX; wherein, "XX" represents the name of the relevant table, and the truncate table statement can delete all the rows of the related table. In step S101, the truncate table statement acts on the first table, and can delete all rows in the first table. The first table may refer to any table file in the database.

[0038] Exemplarily, the database (database, DB) may be a relational database management syst...

Embodiment 2

[0052] In this embodiment, another database flashback processing method is introduced for the case where the database flashback needs to restore not only the truncated table, but also other operations such as delete, update, and insert.

[0053] Exemplary, see image 3 Another database flashback processing method is illustrated, and the method includes the following steps.

[0054] S301. Acquire a first operation instruction at a first moment.

[0055] The first operation instruction is used to instruct the user to modify the database; wherein, the first operation instruction includes a truncation statement for truncating the first table in the database. The definition of the truncated sentence can be understood with reference to S101, which will not be repeated in this embodiment of the present application.

[0056] In addition, the first operation instruction further includes a database manipulation language (data manipulation language, DML) type of statement, and the DLM ...

example 1

[0061] Example 1, the first operation instruction includes a truncate statement, an insert statement, an update statement, and a delete statement corresponding to the first table. Taking tb1 as the first table and executing statements one by one as an example, the first operation instruction can be divided into the following steps T1-T4 to execute.

[0062] T1, truncate tb1: truncate tb1;

[0063] T2, insert data into tb1: insert into tb2(id, name)values(3,'test3');

[0064] T3, update the data in tb1: update tb1 set name='test33' where id=1;

[0065] T4, delete some data in tb1: delete from tb1 where id=3 and name='test33'.

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 provides a flash-back processing method and device of a database and electronic equipment. The flash-back processing method and device of the database are used for solving the technical problem that flash-back processing of the database is not accurate. The method comprises the steps of obtaining a first operation instruction at a first moment, wherein the first operation instruction is used for indicating a modification operation of a user on a database; wherein the first operation instruction comprises a truncation statement used for truncating a first table in a database; performing compression backup on the first table to obtain a compressed file of the first table; acquiring a second operation instruction at a second moment, wherein the second operation instruction is used for indicating that the database is flashed back to a state before the first moment; and recovering the first table into the database according to the compressed file of the first table.

Description

technical field [0001] The present application relates to the field of computer technology, in particular to a database flashback processing method, device and electronic equipment. Background technique [0002] Flashback database refers to restoring the database to the state at a certain moment before, and the modification operations related to the database between a certain moment before and the moment when the flashback database is executed will be undone or called rollback. [0003] At present, the reverse operation is usually performed based on the operation log of the database to realize the flashback processing of the database. However, for modification operations such as truncated tables, because the database modification content corresponding to the operation cannot be determined from the operation log, the recovery of the truncated table is generally given up by default. The flashback processing of the database is not accurate, and the loss of the truncated table ...

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 Applications(China)
IPC IPC(8): G06F11/14G06F16/174
CPCG06F11/1448G06F16/1744
Inventor 钟小燕黄景平段江南
Owner CHINA TELECOM CLOUD TECH CO LTD