Do you have a headache in obtaining Oracle snapshots and dblink operations? If this is the case, the following articles will give you corresponding solutions. The following articles mainly describe how to create the dblin solution on the Oracle target database, the following is a detailed description of the relevant content. Oracle snapshot and dblink usage (data synchronization between two servers) Glossary: Source-synchronized Database
Target Database
1. Create a dblink:
1. Create dblin on the target Oracle Database
- drop database link dblink_anson;
- Create public
- database link dblink_anson
- Connect to lg identified by lg using 'SDLGDB';
Source database user name, password, server name k
Ii. Create a snapshot:
1. Execute the following statement on both the source and target databases to create the table to be synchronized.
- drop table tb_anson;
- create table tb_anson(c1 varchar2(12));
- alter table tb_anson add constraint pk_anson primary key (C1);
2. Test dblink on the target database
- select * from tb_anson@dblink_anson;
- select * from tb_anson;
3. Create a snapshot log for the table to be synchronized on the target Oracle Database
- Create snapshot log on tb_anson;
4. Create a snapshot. the snapshot (source to be synchronized) Database Service must be started)
- Create snapshot sn_anson as select * from tb_anson@dblink_anson;
5. Set the snapshot refresh time
- Alter snapshot anson refresh fast Start with
sysdate+1/24*60 next sysdate+10/24*60;
Oracle automatically performs the first quick refresh in 1 minute, and then refresh every 10 minutes.
- Alter snapshot anson refresh complete Start with
sysdate+30/24*60*60 next sysdate+1;
Oracle automatically performs the first full refresh after 30 banknote, and then completely refresh every 1 day.
6. manually refresh snapshots
- begin
- dbms_refresh.refresh('"CS"."SN_ANSON"');
- end;
The above content is an introduction to the relevant content of the Oracle target database. I hope you will have some gains.