zoukankan      html  css  js  c++  java
  • oracle闪回查询和闪回数据库

    区别:

    数据闪回查询,只需要启用撤销表空间自动管理回滚信息。

    使用闪回删除技术和闪回数据库技术,需要启动回收站,闪回恢复区。(归档模式使用)

    具体设置:

    ---cmd sqlplus nolog sys as sysdba hanatech

    具体设置----数据闪回查询的设置:

    查看撤销表信息undo:

    show parameter undo;

    设置撤销表信息:

    alter system set undo_managerment=auto;设置为auto才可以使用闪回查询

    alter system set undo_retention=900;最长保留时间(单位秒)

    alter system set undo_tablespace=undotbs1;

    查看归档模式

    archive log list;

    查看闪回区文档位置(默认的已经设置了闪回回复区)

    show parameter db_recovery_file

    设置归档模式(可能归档模式默认就启动了undo,可以省略上面的设置undo)

    alter system archive log start;

    基于as of timestamp的闪回查询

    select * from t_car_carstate as of timestamp to_timestamp('2012-5-29 18:30:00','YYYY-MM-DD HH24:MI:SS')

    -----------------------------------------------------------------

    ------------------------------------------------------------------

    具体设置----闪回数据库技术设置:

    查看归档模式 archive log list;

    设置归档模式:

    shutdown immediate;

    startup mount;

    alter database archivelog;

    alter database open;

    alter system archive log start;

    archive log list;

    查看闪回区文档位置(默认的已经设置了闪回回复区)

    show parameter db_recovery_file

    启动数据库flashback特性

    shutdown immediate;

    startup mount;

    alter database flashback on;

    alter database on;

    alter system set db_flashback_retention_target=2880;设置归档时间:(默认的是一天1440分钟)

  • 相关阅读:
    【C++11】准备:gcc 4.9.0编译安装
    【转】C++ 虚函数表解析
    【工作总结】内存泄漏总结
    【工作总结】C++ string工具类
    工作总结
    【工作笔记】CxImage简介
    【工作笔记】没有界面程序调用ActiveX控件
    【工作笔记】npapi插件编写
    【工作笔记】VLC播放器在chrome中的调用
    Linux多任务编程之三:exec函数族及其基础实验(转)
  • 原文地址:https://www.cnblogs.com/minglilee2012/p/2524508.html
Copyright © 2011-2022 走看看