高階複製-4、非主體定義站點上的操作

lirenquan發表於2011-01-13

1、建立repadmin使用者,用於管理高階複製
create user repadmin identified by repadmin default tablespace users temporary tablespace temp;
execute dbms_defer_sys.register_propagator('repadmin');
grant execute any procedure to repadmin;
execute dbms_repcat_admin.grant_admin_any_repgroup('repadmin');
execute dbms_repcat_admin.grant_admin_any_schema(username => '"REPADMIN"');
grant comment any table to repadmin;
grant lock any table to repadmin;
grant select any dictionary to repadmin;

SQL> desc dba_tablespaces;      
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 TABLESPACE_NAME                           NOT NULL VARCHAR2(30)
 BLOCK_SIZE                                NOT NULL NUMBER
 INITIAL_EXTENT                                     NUMBER
 NEXT_EXTENT                                        NUMBER
 MIN_EXTENTS                               NOT NULL NUMBER
 MAX_EXTENTS                                        NUMBER
 PCT_INCREASE                                       NUMBER
 MIN_EXTLEN                                         NUMBER
 STATUS                                             VARCHAR2(9)
 CONTENTS                                           VARCHAR2(9)
 LOGGING                                            VARCHAR2(9)
 FORCE_LOGGING                                      VARCHAR2(3)
 EXTENT_MANAGEMENT                                  VARCHAR2(10)
 ALLOCATION_TYPE                                    VARCHAR2(9)
 PLUGGED_IN                                         VARCHAR2(3)
 SEGMENT_SPACE_MANAGEMENT                           VARCHAR2(6)
 DEF_TAB_COMPRESSION                                VARCHAR2(8)
 RETENTION                                          VARCHAR2(11)
 BIGFILE                                            VARCHAR2(3)

SQL> select tablespace_name,contents from dba_tablespaces;

TABLESPACE_NAME                                              CONTENTS
------------------------------------------------------------ ------------------
SYSTEM                                                       PERMANENT
UNDOTBS1                                                     UNDO
SYSAUX                                                       PERMANENT
TEMP                                                         TEMPORARY
USERS                                                        PERMANENT
EXAMPLE                                                      PERMANENT
TEST                                                         PERMANENT

7 rows selected.

SQL> create user repadmin identified by repadmin default tablespace users temporary tablespace temp;

User created.

SQL> execute dbms_defer_sys.register_propagator('repadmin');                                                                     
grant execute any procedure to repadmin;
execute dbms_repcat_admin.grant_admin_any_repgroup('repadmin');
execute dbms_repcat_admin.grant_admin_any_schema(username => '"REPADMIN"');
grant comment any table to repadmin;
grant lock any table to repadmin;
grant select any dictionary to repadmin;

PL/SQL procedure successfully completed.

SQL>
Grant succeeded.

SQL>
PL/SQL procedure successfully completed.

SQL>
PL/SQL procedure successfully completed.

SQL>
Grant succeeded.

SQL>
Grant succeeded.

SQL>
Grant succeeded.


2、建立公共的dblink連線到複製站點
CREATE PUBLIC DATABASE LINK MASTER.COM connect to repadmin identified by repadmin  USING 'MASTER_SITE';

3、建立私有DB LINKS
CREATE DATABASE LINK MASTER.COM@PERMIN connect to repadmin identified by repadmin  USING 'MASTER_SITE';

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12350275/viewspace-683777/,如需轉載,請註明出處,否則將追究法律責任。

相關文章