用于从回收站中恢复被删除的表。
回收站需要处于开启状态,可以通过SHOW VARIABLES LIKE 'recyclebin';
来查看回收站是否开启。
obclient>SHOW VARIABLES LIKE 'recyclebin';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| recyclebin | ON |
+---------------+-------+
1 row in set (0.00 sec)
如果回收站处于关闭状态,可以通过SET RECYCLEBIN = ON;
来开启。回收站中的表没有被实际删除,仍然会占用资源,如果需要彻底删除,可以执行PURGE RECYCLEBIN;
FLASHBACK TABLE object_name TO BEFORE DROP [RENAME to db_name.table_name];
参数 |
描述 |
---|---|
object_name |
指定要恢复的对象名称或表名,只有在表所在的数据库中才能执行。恢复表时,也会同步恢复和表相关的索引。 |
RENAME to |
修改表名和表所属的库。 |
obclient>CREATE TABLE t(id INT PRIMARY KEY, k INT);
Query OK, 0 rows affected (0.04 sec)
obclient>INSERT INTO t VALUES(1,1);
Query OK, 1 row affected (0.00 sec)
obclient>SELECT * FROM t;
+----+------+
| id | k |
+----+------+
| 1 | 1 |
+----+------+
1 row in set (0.00 sec)
obclient>DROP TABLE t;
Query OK, 0 rows affected (0.01 sec)
obclient>SELECT * FROM t;
ORA-00942: table or view 'SYS.T' does not exist
obclient>SHOW RECYCLEBIN;
+--------------------------------+---------------+-------+----------------------------+
| OBJECT_NAME | ORIGINAL_NAME | TYPE | CREATETIME |
+--------------------------------+---------------+-------+----------------------------+
| RECYCLE_$_2_1616038871797032 | T | TABLE | 18-MAR-21 11.41.11.797691 AM|
+--------------------------------+---------------+-------+----------------------------+
1 row in set (0.00 sec)
obclient>FLASHBACK TABLE t TO BEFORE DROP;
Query OK, 0 rows affected (0.01 sec)
obclient>SELECT * FROM t;
+----+------+
| id | k |
+----+------+
| 1 | 1 |
+----+------+
1 row in set (0.00 sec)
Runnable@FunctionalInterfacepublic interface RunnableRunnable 接口应该由其实例打算由线程执行的任何类实现。 该类必须定义...
Mathjava.lang.Object |---java.lang.Mathpublic final class Mathextends ObjectMath 类包含执行基本数值运算的方法,例如初等...
Systemjava.lang.Object |---java.lang.Systempublic final class Systemextends ObjectSystem 类包含几个有用的类字段和方法。 ...
Thread.Statejava.lang.Object |---java.lang.EnumThread.State |---|---java.lang.Thread.Statepublic static enum Thread.Stat...
InterruptedExceptionjava.lang.Object |---java.lang.Throwable |---|---java.lang.Exception |---|---|---java.lang.Interrupt...
cover-view基础库 1.4.0 开始支持,低版本需做兼容处理覆盖在原生组件之上的文本视图,可覆盖的原生组件包括map、video、canvas...