---
title: "oracle闪回命令列表"
author: "fourfire"
date: "2009-06-04T11:51:24Z"
tags: []
slug: "oracle"
draft: false
lastmod: "2009-06-04T11:51:24Z"
id: 401690
url: "https://fourfire.iteye.com/blog/401690"
---

闪回必须在归档模式下才能使用
闪回的命令
例：执行Flashback Database命令格式。 
SQL>flashback database to time to_timestamp(xxx);
SQL>flashback database to scn xxx
 
例：执行将test表闪回到2005年5月7日下午3点。 
SQL>flashback table test to timestamp to_timestamp(’2005-05-07 15:00:00’,’yyyy-mm-dd hh24:mi:ss’);
 
例：表被drop后恢复
SQL>select * from recyclebin;
SQL>flashback table "BIN$b+XkkO1RS5K10uKo9BfmuA==$0" to before drop; --回收站表名
或
SQL>flashback table test_drop to before drop  --真实表名
例：闪回查询
SQL>select * from t as of timestamp to_timestamp('2006-09-06 12:47:12','yyyy-mm-dd hh24:mi:ss');
启用行移动
SQL> alter table table1 enable row movement;