您可以用system身份登錄數據庫
①
指明數據庫的域名(默認的是WORLD)
②
它要求數據庫鏈接(database link)和被連接的數據庫名稱一致
現在全局數據庫名
③
job_queue_processes =
job_queue_interval =
distributed_transactions =
open_links =
如果修改了以上這幾個參數
數據庫名 ying orcl
數據庫域名
數據庫sid號 ying orcl
Listener端口號
服務器ip地址
①
alter database rename global_name to
用system身份登錄orcl數據庫
alter database rename global_name to
②
create public database link using
select * from globa
用system身份登錄orcl數據庫
create public database link using
select * from globa
①
create user repadmin identified by repadmin default tablespace users temporary tablespace temp
begin
dbms_defer_sys
end;
grant execute any procedure to repadmin;
begin
dbms_repcat_admin
end;
grant comment any table to repadmin;
grant lock any table to repadmin;
②
create user repadmin identified by repadmin default tablespace users temporary tablespace temp
begin
dbms_defer_sys
end;
grant execute any procedure to repadmin;
begin
dbms_repcat_admin
end;
grant comment any table to repadmin;
grant lock any table to repadmin;
*********************************************************************
說明
*********************************************************************
①
create database link connect to repadmin identified by repadmin;
select * from globa
②
create database link connect to repadmin identified by repadmin;
select * from globa
假設我們用ORACLE裡舉例用的water用戶
①
SQL>create user water identified by water default tablespace water temporary tablespace water;
SQL>grant connect
SQL>grant execute on sys
②
③
alter table t_file_all add (constraint t_file_all_key primary key (t_file_all_id));
④
⑤
⑥
⑦
⑧
①
begin
dbms_repcat
end;
②
begin
dbms_repcat
(sname=>
type=>
gname=>
);
end;
*******************************
參數說明
sname 實現數據庫復制的用戶名稱
oname 實現數據庫復制的數據庫對象名稱
(表名長度在
type 實現數據庫復制的數據庫對象類別
(支持的類別
use_existing_object true表示用主復制節點已經存在的數據庫對象
gname 主復制組名
*******************************
③
begin
dbms_repcat
end;
(說明
④
select gname
select * from dba_repobject
①
begin
dbms_repcat
(gname=>
master=>
use_existing_objects=>true
copy_rows=>false
propagation_mode =>
end;
**********************************************
參數說明
gname 主復制組名
master 加入主復制節點的另一個數據庫
use_existing_object true表示用主復制節點已經存在的數據庫對象
copy_rows false表示第一次開始復制時不用和主復制節點保持一致
propagation_mode 異步地執行
***********************************************
select * from user_jobs;
①
begin
dbms_repcat
end;
begin
dbms_repcat
end;
select gname
①
begin
dbms_defer_sys
destination =>
interval =>
next_date => sysdate);
end;
/
begin
dbms_defer_sys
next_date => sysdate
interval =>
delay_seconds =>
rollback_segment =>
end;
②
begin
dbms_defer_sys
destination =>
interval =>
next_date => sysdate);
end;
/
begin
dbms_defer_sys
next_date => sysdate
interval =>
delay_seconds =>
rollback_segment =>
end;
From:http://tw.wingwit.com/Article/program/Oracle/201311/18695.html