A successful increment Snapshot example

zhaozj2021-02-16  50

Case: Shanghai has a database, Beijing has another database, all of the Oracle9i Standard Edition. In the database of Shanghai, you need to copy a table in Beijing. Timed once every day. Due to the large amount of data, all backup recovery methods Therefore, the incremental Snapshot Procedure:

Step1: Establishing a network service name beijing at the Shanghai Server side

$ Host $ = (deScription = (address = (protocol = tcp) (host = $ beijing_server $) (port = 1521))))) (server_name = $ bjora $)) This step can be used in Oracle Network formulation, you can also directly modify TNSNames.ora in the Shanghai server side. (Question? Under UNIX, which way is common, directly modify TNSNAMES.ORA?)

Step2: Shanghai Server, establishing a DBLINK CREATE PUBLIC DATABASE LINK $ DBLINK $ Connect To $ UserName $ USINGTIFIED BY $ PASSWORD $ μing '$ Host $'

. Step3 establish SNAPSHOT LOG Create SNAPSHOT LOG ON $ TAB $ WITH PRIMARY KEY on Beijing servers; Step4 establish SNAPSHOT Create SNAPSHOT $ TAB $ BUILD IMMEDIATE REFRESH FAST NEXT sysdate $ x $ / 24 AS SELECT * FROM in Shanghai server $ TAB $ @ $ dblist $

STEP5 If you are manually refreshed, exec dbms_snapshot.refresh ('$ TAB $');

The above verification, Master data has been changed quickly.

If you don't have to copy advanced replication of Oracle Enterprise Edition, you can also implement basic simple reproductions to meet the general business requirements.

转载请注明原文地址:https://www.9cbs.com/read-25316.html

New Post(0)