flashback

How to restore the data in a Oracle table?

梦想与她 提交于 2019-12-18 13:48:07
问题 I did a terrible mistake on my work, I executed an updated query on a oracle table without the 'where' clause and everything changed on this table, I was wondering if there is any way to restore the data on a table. I know I can use Flashback, but Is there another way to do that? If you know how to make a flashback table in oracle, please let me know. I'm using Oracle 10g R2 10.2.0.1 回答1: First, did you commit the change? If not, you can simply issue a rollback to revert your changes.

找回误删的表和数据

橙三吉。 提交于 2019-12-11 12:11:36
一、找回误删的表 1、在recyclebin(类似于回收站)中查找drop的表:select * from recyclebin order bydroptime desc; 2、恢复表和表数据:flashback table ‘表名’ to before drop;值得注意的是,当一张表被drop两次及两次以上的时候,flashback命令只恢复dropscn大的哪个表。如果在drop表的时候再结束加上purge,如:drop table '表名' purge;,则无法通过flashback命令恢复。因为在加上了purge后drop,就类似粉碎文件,文件则不会放入回收站中。 最后在记录下如何查找被修改的数据,方便以后使用: 查找指定时间的快照 select * from '表名' as of timestamp to_timestamp('2019-12-10 15:59:00', 'yyyy-mm-dd hh24:mi:ss'); alter table '表名' enable row movement; row movement 意思就是,一个现存的行允许改变其rowid(物理存储地址),通常情况下,数据行在分配了空间之后,行的rowid就固定了。即使以后行长度超出预留的空间,也不会将其移动。12c的“ALTER TABLE XXX MOVE; ”并不受此控制

Tune Oracle Database for faster startup (flashback)

懵懂的女人 提交于 2019-12-07 03:56:06
问题 I'm using Oracle Database 11.2. I have a scenario where I issue FLASHBACK DATABASE quite often. It seems that a FLASHBACK DATABASE cycle does a reboot of the database instance which takes approx. 7 seconds on my setup. Database is small (~ 1 GB tablespace), all files should be in I/O caches/buffers. Therefore I think that the bottleneck is not I/O based. I'm looking for tuning advices in order to save user time and/or CPU time for doing a flashback. UPDATE: Flashback sequence (and timing of

Tune Oracle Database for faster startup (flashback)

我的梦境 提交于 2019-12-05 08:05:26
I'm using Oracle Database 11.2. I have a scenario where I issue FLASHBACK DATABASE quite often. It seems that a FLASHBACK DATABASE cycle does a reboot of the database instance which takes approx. 7 seconds on my setup. Database is small (~ 1 GB tablespace), all files should be in I/O caches/buffers. Therefore I think that the bottleneck is not I/O based. I'm looking for tuning advices in order to save user time and/or CPU time for doing a flashback. UPDATE: Flashback sequence (and timing of each step) is the following: 1. Get SYSDBA connection with prelim_auth=true [15 ms] 2. SHUTDOWN ABORT;

【MySQL】MariaDB10.2新特性--Flashback

非 Y 不嫁゛ 提交于 2019-12-02 02:03:27
MariaDB10.2新特性--Flashback Flashback可以回滚到旧的数据,用于解决用户误删除数据的问题。 实战例子 MariaDB [zsd]> select * from test; +------+-----------+ | id | name | +------+-----------+ | 1 | 张盛东 | | 2 | 刘忠浩 | | 3 | 胡轲 | +------+-----------+ 3 rows in set (0.001 sec) MariaDB [zsd]> select now(); +---------------------+ | now() | +---------------------+ | 2019-09-26 16:17:51 | +---------------------+ 1 row in set (0.000 sec) MariaDB [zsd]> delete from test; Query OK, 3 rows affected (0.012 sec) MariaDB [zsd]> commit; Query OK, 0 rows affected (0.000 sec) MariaDB [zsd]> select * from test; Empty set (0.000 sec) 对插入之前的时间点

How to restore the data in a Oracle table?

非 Y 不嫁゛ 提交于 2019-11-30 10:32:58
I did a terrible mistake on my work, I executed an updated query on a oracle table without the 'where' clause and everything changed on this table, I was wondering if there is any way to restore the data on a table. I know I can use Flashback, but Is there another way to do that? If you know how to make a flashback table in oracle, please let me know. I'm using Oracle 10g R2 10.2.0.1 First, did you commit the change? If not, you can simply issue a rollback to revert your changes. Assuming that you did commit your changes, are other users modifying the table at the same time? Do you need to

Use of FLASHBACK in Oracle

余生颓废 提交于 2019-11-28 02:22:50
I have searched for the flashback command. Somewhere it is written we can rollback the truncate operation, and somewhere it is written we can't rollback. Can the FLASHBACK command in Oracle used to rollback the truncate table operation? Lalit Kumar B You need to have Flashback Data Archive enabled. Then the truncate could be reversed with a statement like this: insert into <truncated_table> select * from <truncated_table> as of timestamp <some time>; Thanks to @ Jon Heller for adding this useful information about the new feature: This requires version 11.2 or higher, which introduced support