There are several options for accomplishing this, depending
on which Oracle features you are using.
You can use database triggers to replicate data from one table into another. For example, after
every insert into a table, a trigger may fire to insert that same record into another table??”and that
table may be in a remote database. Thus, you can use triggers to enforce data replication in simple
configurations. If the types of transactions against the base table cannot be controlled, the trigger
code needed to perform the replication will be unacceptably complicated.
When using Oracle??™s distributed features, you can use materialized views to replicate data
between databases. You do not have to replicate an entire table or limit yourself to data from just
one table. When replicating a single table, you may use a where clause to restrict which records
are replicated, and you may perform group by operations on the data. You can also join the table
with other tables and replicate the result of the queries.
NOTE
You cannot use materialized views to replicate data using LONG,
LONG RAW, or user-defined datatypes.
The data in the local materialized view of the remote table(s) will need to be refreshed. You
can specify the refresh interval for the materialized view, and the database will automatically take
care of the replication procedures. In many cases, the database can use a materialized view log
to send over only transaction data (changes to the table); otherwise, the database will perform
complete refreshes on the local materialized view.
Pages:
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885