建立oracle快照的步驟
建立oracle快照的步驟[@more@]
1、 建立快照之前需要在sys使用者下執行catrep.sql(此操作需要一個大的回滾段), 並且給user授予CREATE ANY SNAPSHOT、ALTER ANY SNAPSHOT許可權
注:建立快照的兩端資料庫字符集最好一樣。
2、 user建立DBLINK
CREATE DATABASE LINK TEST CONNECT TO SCOTT IDENTIFIED BY TIGER USING ‘TEST’;
3、 user建快照
CREATE SNAPSHOT S_TEST
REFRESH COMPLETE START WITH SYSDATE NEXT SYSDATE+1/24
AS SELECT * FROM SCOTT.TEST@TEST ;
REFRESH語句具體語法如下:
REFRESH
specifies how and when Oracle automatically refreshes the snapshot:
FAST
specifies a fast refresh, or a refresh using only the updated data stored in the snapshot log associated with the master table.
COMPLETE
specifies a complete refresh, or a refresh that reexecutes the snapshot's query.
FORCE
specifies a fast refresh if one is possible or complete refresh if a fast refresh is not possible. Oracle decides whether a fast refresh is possible at refresh time.
If you omit the FAST, COMPLETE, and FORCE options, Oracle uses FORCE by default. See also "Refreshing Snapshots".
START WITH
specifies a date expression for the first automatic refresh time.
NEXT
specifies a date expression for calculating the interval between automatic refreshes.
Both the START WITH and NEXT values must evaluate to a time in the future. If you omit the START WITH value, Oracle determines the first automatic refresh time by evaluating the NEXT expression when you create the snapshot. If you specify a START WITH value but omit the NEXT value, Oracle refreshes the snapshot only once. If you omit both the START WITH and NEXT values, or if you omit the REFRESH clause entirely, Oracle does not automatically refresh the snapshot.
4、 更改快照
ALTER SNAPSHOT S_TEST
REFRESH COMPLETE START WITH SYSDATE NEXT SYSDATE+1/2;
5、 手動重新整理快照
EXEC DBMS_SNAPSHOT.REFRESH(‘S_TEST’ , ‘C’);
第一個引數是要重新整理的快照名
第二個引數是重新整理的方式,F----FAST, C---COMPLETE
6、 檢視快照最後重新整理的日期
SELECT NAME,LAST_REFRESH
FROM ALL_SNAPSHOT_REFRESH_TIMES;
[[i] Last edited by liuyy on 2005-10-10 at 14:28 [/i]]
注:建立快照的兩端資料庫字符集最好一樣。
2、 user建立DBLINK
CREATE DATABASE LINK TEST CONNECT TO SCOTT IDENTIFIED BY TIGER USING ‘TEST’;
3、 user建快照
CREATE SNAPSHOT S_TEST
REFRESH COMPLETE START WITH SYSDATE NEXT SYSDATE+1/24
AS SELECT * FROM SCOTT.TEST@TEST ;
REFRESH語句具體語法如下:
REFRESH
specifies how and when Oracle automatically refreshes the snapshot:
FAST
specifies a fast refresh, or a refresh using only the updated data stored in the snapshot log associated with the master table.
COMPLETE
specifies a complete refresh, or a refresh that reexecutes the snapshot's query.
FORCE
specifies a fast refresh if one is possible or complete refresh if a fast refresh is not possible. Oracle decides whether a fast refresh is possible at refresh time.
If you omit the FAST, COMPLETE, and FORCE options, Oracle uses FORCE by default. See also "Refreshing Snapshots".
START WITH
specifies a date expression for the first automatic refresh time.
NEXT
specifies a date expression for calculating the interval between automatic refreshes.
Both the START WITH and NEXT values must evaluate to a time in the future. If you omit the START WITH value, Oracle determines the first automatic refresh time by evaluating the NEXT expression when you create the snapshot. If you specify a START WITH value but omit the NEXT value, Oracle refreshes the snapshot only once. If you omit both the START WITH and NEXT values, or if you omit the REFRESH clause entirely, Oracle does not automatically refresh the snapshot.
4、 更改快照
ALTER SNAPSHOT S_TEST
REFRESH COMPLETE START WITH SYSDATE NEXT SYSDATE+1/2;
5、 手動重新整理快照
EXEC DBMS_SNAPSHOT.REFRESH(‘S_TEST’ , ‘C’);
第一個引數是要重新整理的快照名
第二個引數是重新整理的方式,F----FAST, C---COMPLETE
6、 檢視快照最後重新整理的日期
SELECT NAME,LAST_REFRESH
FROM ALL_SNAPSHOT_REFRESH_TIMES;
[[i] Last edited by liuyy on 2005-10-10 at 14:28 [/i]]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/703656/viewspace-903362/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 建立BAPI程式的步驟API
- oracle資料庫使用者建立步驟Oracle資料庫
- mavenWeb工程建立步驟MavenWeb
- 資訊保安策略建立步驟
- LVM建立的詳細步驟LVM
- 用SQL建立索引的方法步驟SQL索引
- ORACLE重建OEM的步驟Oracle
- ORACLE DB建立步驟-運用冷備份和RMANOracle
- 手工建立資料庫的完整步驟資料庫
- github中建立倉庫步驟Github
- 1、啟動oracle的步驟Oracle
- Oracle重建awr步驟Oracle
- oracle 安裝步驟Oracle
- oracle升級步驟Oracle
- ORACLE啟動步驟Oracle
- 手工建立/刪除資料庫的步驟資料庫
- mac下建立bash_profile步驟Mac
- mysql建立master/slave詳細步驟MySqlAST
- AIX 建立檔案系統步驟AI
- 手動建立資料庫步驟資料庫
- Oracle冷備份的通常步驟Oracle
- oracle啟動的三個步驟Oracle
- Oracle 啟動的三個步驟Oracle
- 使用Oracle Statpack的具體步驟Oracle
- Oracle DataGuard切換步驟Oracle
- Oracle的快照standbyOracle
- Laravel5.5 新專案建立步驟Laravel
- windows下解除安裝oracle的步驟WindowsOracle
- Oracle中SQL語句解析的步驟OracleSQL
- 簡單oracle安裝步驟Oracle
- Oracle EM agent刪除步驟Oracle
- Oracle ADG實施步驟Oracle
- ORACLE RAC OCFS(步驟簡要)Oracle
- VMware中配置ORACLE DATAGUARD步驟Oracle
- Oracle Stream配置詳細步驟Oracle
- Oracle SQL優化基本步驟OracleSQL優化
- 手工建立一個資料庫的步驟參考資料庫
- Masonite 熟悉步驟小記錄 (四、模型建立)模型