zoukankan      html  css  js  c++  java
  • [bbk5106] 第40集 第四章 Flashback Database 04

    Oracle Total Recall Scenario

    Using Flashback Data Archive to access historical data:

    --create the flashback data archive
    
    create flashback archive default fla1 tablespace tbs1 quota 10g retention 5 year;
    --specifiy the default flashback data archive 
    
    alter flashback archive fla1 set default;
    --enable flashback data archive
    
    alter table inventory flashback archive;
    
    alter table stock_data flashback archive;
    select product_number,product_name,count from inventory as of timestamp to_timestamp('2007-01-01 00:00:00','yyyy-mm-dd hh24:mi:ss');

    Optionally,adding space:

    alter flashback archive fla1 add tablespace tbs3 quota 5g;

    optionally,changing retention time:

    alter flashback archive fla1 modify retention 2 year;

    optionally,purging data:

    alter flashback archive fla1 purge before timestamp(systimestamp - interval '1` day);

    optionally,dropping a flashback data archive:

    drop flashback archive fla1;

    Viewing Flashback Data Archives

    Viewing the results:

    View Name(DBA/USER) Description
    *_FLASHBACK_ARCHIVE Displays information about Flashback Data Archives
    *_FLASHBACK_ARCHIVE_TS Displays tablespaces of Flashbackd Data Archives
    *_FLASHBACK_ARCHIVE_TABLES Displays information about tables that are enabled for flashback archiving

    查询哪张表纳入了数据闪回归档区?

    SQL> select table_name,owner_name,status from user_flashback_archive_tables;
    
    TABLE_NAME                     OWNER_NAME                     STATUS
    ------------------------------ ------------------------------ --------
    NETSTORE_INCOMEEXPENDITURELIST ARCER                          ENABLED
    EMP                            ARCER                          ENABLED

    其他与纳入数据闪回归档区的相关的表空间信息、状态信息等可参照上述表格中提供的数据字典进行查询.

  • 相关阅读:
    Json-lib使用 转载
    利用PinYin4j 实现List中的对象按数字,字母, 汉字排序
    web 模板 类似京东左侧的导航栏
    常见挂马方式
    JS挂马攻防
    代码中的202.102.100.100
    利用Jquery获取、设置iframe中元素
    [PHP]基本排序(冒泡排序、快速排序、选择排序、插入排序、二分法排序)
    js验证输入的金钱格式
    js获取当前对象的颜色判断改变颜色
  • 原文地址:https://www.cnblogs.com/arcer/p/3085479.html
Copyright © 2011-2022 走看看