oracle 快照(snapshot) 管理,oraclesnapshot

來源:互聯網
上載者:User

oracle 快照(snapshot) 管理,oraclesnapshot


----手工建立oracle 快照
BEGIN
DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();
END;
/


---刪除快照
具體快照資訊可以查看視圖 DBA_HIST_SNAPSHOT

BEGIN
DBMS_WORKLOAD_REPOSITORY.DROP_SNAPSHOT_RANGE (low_snap_id => 22,
high_snap_id => 32, dbid => 3310949047);
END;
/


---修改快照設定
BEGIN
DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS( retention => 43200, interval => 30, topnsql => 100, dbid => 3310949047);
END;
/

/* retention :43200 minutes (30 days) ;interval:30 minutes ;topsql:    */
通過視圖  DBA_HIST_WR_CONTROL 查看當前快照參數配置。


怎手動重新整理Oracle中的快照snapshot??

在oracle7.3 Group Server之間好象不可啊! ORA-06508: PL/SQL: could not find program unit being called我用 SYS.DBMS_SNAPSHOT.REFRESH 時掉足掉足資訊如下: ORA-04068: existing state of packages has been discarded ORA-04063: package body "SYS.DBMS_SNAPSHOT" has errors ORA-06512: at line 2 查看原帖>>
 
oracle的snapshot

snapshot就是快照

oracle資料庫的快照是一個表,它包含有對一個本地或遠端資料庫上一個或多個表或視圖的查詢的結果。相當於主表的查詢子集,使用快照可以加快資料的查詢速度;在保持不同資料庫中的兩個表的同步中,利用快照重新整理,資料的更新效能也會有很大的改善。
 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.