zoukankan      html  css  js  c++  java
  • [bbk4795] 第37集 第四章 Flashback Database 01

    数据归档区管理员(FLASHBACK ARCHIVE ADMINISTER)

    在日常管理中,可以安排一个专门人员负责数据归档区的管理.DBA分配FLASHBACK ARCHIVE ADMINISTER权限给此用户.

    空间

      TABLESPACE

    权限

      |-SELECT ANY TRANSACTION

      |-FALASHBACK ARCHI

      |-DBMS_FLASHBACK(PACKAGE EXECUTE PRIVES)

    How Total Recall Works

    History data:

    • Row captured asynchronously by background processes at selft-tuned intervals(default:5 min)
    • Stored compressed and partitioned
    • Automatically purged per retention policy
    • Partitions automatically created based on time and volume
    • Unrelated partitions skipped by queries

    Step Process

    1、Create a new database to hold the FDA

    2、With the FLASHBACK ARCHIVE ADMINISTER system privilege:Create a Flashback Data Archive,assign it to the tablespace,and specify its retention period.

    CREATE FLASHBACK ARCHIVE fda1 TABLESPACE fda_tbs1 QUOTA 10M RETENTION 1 YEAR;

    3、With the FLASHBACK ARCHIVE object privilege:Alter the base tables to enable archiving and assign it to a flashback archive.

    ALTER TABLE HR.EMPLOYEES FLASHBACK ARCHIVE fda1;

    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;
    --Specify 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('20017-01-01 00:00:00','YYYY:MM-DD HH24:MI:SS');
  • 相关阅读:
    F. 蚂蚁装修
    D. 蚂蚁平面
    B. 蚂蚁觅食(二)
    A 蚂蚁觅食
    落谷 P1734 最大约数和
    F
    D
    Http头 Range、Content-Range(http断点续传原理)
    Http头 Range、Content-Range
    XCODE 4.5 IOS多语言设置 及NSLocalizedString和NSLocalizedStringFromTable的用法。
  • 原文地址:https://www.cnblogs.com/arcer/p/3085302.html
Copyright © 2011-2022 走看看