Get the App
SLTechnology News&Howtos  ›  Database  › 

ORACLE restore Delete Table or Table record

Shulou Source: shulou.com Published: 2022-06-01 08:27:53 09月17日 Update

One: table recovery for mistakenly deleted tables, as long as you do not use the PURGE permanent delete option, then it is very promising to recover from the flash back area. The general steps are: 1. Query the deleted table select * from recyclebin2 from flash back. Perform the recovery flashback table tb to before drop of the table, where the tb represents the name of the table you want to restore. 2: table data recovery for mistakenly deleted table records, as long as there is no truncate statement, you can choose to restore according to the transaction submission time. The general steps are as follows: 1. First, query from the flashback_transaction_query view, which provides fields such as table name, transaction submission time, UNDO_SQL and so on. For example, select * from flashback_transaction_query where table_name='TEST'; 2, performing table record recovery is usually queried based on the time, and the query statement mode is select * from tb as of timestamp to_timestamp (time,'yyyy-mm-dd hh34:mi:ss'). / / tb refers to the name of the table, and time refers to a certain point in time, such as select * from scott.test as of timestamp to_timestamp ('2009-12-11 20 from scott.test as of timestamp to_timestamp 53 hh34:mi:ss'); if there is data, it is very simple to recover, and the statement is flashback table tb to timestamp to_timestamp (time,'yyyy-mm-dd hh34:mi:ss'). For example, flashback table scott.test to timestamp to_timestamp ('2009-12-11 20 alter table testvarchar enable row movement; 47 alter table testvarchar enable row movement; 30 minutes grammatical rowid); note: the purpose of this command is to allow Oracle to modify the MMMB assigned to a row. In Oracle, a rowid is assigned to a row when it is inserted, and the row will always have the rowid. Flashback table processing completes the DELETE of the EMP and reinserts the rows, thus assigning a new rowid to those rows. To support flashbacks, Oracle must be allowed to perform this operation

Tags: Query time name statement assignment row transaction data step view representative function command field data recovery schema permanent support select Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Tech Info Microsoft MariaDB vpn