oracle 恢复删除的表数据
2016-07-19 10:43
561 查看
--1、查询当前系统时间
select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
--2、查询删除数据的时间点的数据
--(如果不是,则继续缩小范围)
select * from t_weixin_gzshf as of timestamp to_timestamp('2016-06-13 10:05:50','yyyy-mm-dd hh24:mi:ss');
alter table t_weixin_gzshf enable row movement;
--3、恢复删除且已提交的数据
--注意:如果在执行上面的语句,出现错误。可以尝试执行 alter table 表名 enable row movement; //允许更改时间戳
flashback table t_weixin_gzshf to timestamp to_timestamp('2016-06-13 10:05:50','yyyy-mm-dd hh24:mi:ss');
select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
--2、查询删除数据的时间点的数据
--(如果不是,则继续缩小范围)
select * from t_weixin_gzshf as of timestamp to_timestamp('2016-06-13 10:05:50','yyyy-mm-dd hh24:mi:ss');
alter table t_weixin_gzshf enable row movement;
--3、恢复删除且已提交的数据
--注意:如果在执行上面的语句,出现错误。可以尝试执行 alter table 表名 enable row movement; //允许更改时间戳
flashback table t_weixin_gzshf to timestamp to_timestamp('2016-06-13 10:05:50','yyyy-mm-dd hh24:mi:ss');
相关文章推荐
- Oracle中使用REGEXP_SUBSTR,regexp_replace,wm_concat函数
- oracle 笔记2 退出与删除用户
- oracle笔记1-创建用户登录赋权
- oracle database的监听配置
- 批量 删除 oracle sql传入list
- oracle 分析函数和开窗函数 ROW_NUMBER() OVER(PARTITION BY.....)
- Oracle Spatial空间类型
- oracle 恢复被覆盖的存储过程
- oracle函数-cast
- Oracle查看数据库与数据库监听启动状态
- Oracle修改数据库连接数
- Oracle数据库常用操作sql语句
- 4#Oracle的instr函数使用
- oracle客户端可以连接但cmd连不上
- Oracle 恢复表操作内容
- select into 和 insert into select 两种表复制语句的区别
- oracle 导入数据statistics
- 使用sqluldr2实现将Oracle数据无落地快速导入Greenplum数据库
- 我的oracle账号
- rename datafile 做了什么