分类: Mysql/postgreSQL
2008-05-30 10:58:32
以下为引用的内容: connect system/passwd@SH create user repadmin identified by repadmin; begin dbms_repcat_admin.grant_admin_any_schema( username=>’repadmin’); end; / grant comment any table to REPADMIN; grant lock any table to REPADMIN; |
以下为引用的内容: grant select any dictionary to REPADMIN; |
以下为引用的内容: begin dbms_defer_sys.register_purpagator(username=>’repadmin’); end; |
以下为引用的内容: disconnect; connect repadmin/repadmin@SH; begin dbms_defer_sys.schedule_purge( next_date=>sysdate,interval=>’sysdate + 1’,delay_seconds=>0); end; |
以下为引用的内容: disconnect; connect system/passwd@SH; create user proxy_bjoracle identified by proxy_bjoracle; begin dbms_repcat_admin.register_user_repgroup( user_name=>’proxy_bjoracle, privilege_type => ’proxy_snapadmin’,list_of_gnames => NULL); end; / grant select_catalog_role to proxy_bjoracle; |
以下为引用的内容: disconnect; connect repadmin/repadmin@SH; begin dbms_repcat.create_master_repgroup(gname=>’sh_rep’); end; / |
以下为引用的内容: begin dbms_repcat.create_master_repobject( gname=>’sh_rep’, type=>’TABLE’, oname=>’ CREDIT_CARD’ sname=>’SHORACL’ use_existing_object=>TRUE, copy_rows=>TRUE); end; |
以下为引用的内容: begin dbms_repcat.create_master_repobject( gname=>’sh_rep’, type=>’INDEX’, oname=>’ INDEX_CREDIT_CARD’ sname=>’SHORACL’ use_existing_object=>TRUE, copy_rows=>FALSE); end; / |
以下为引用的内容: begin dbms_repcat.set_columns( sname => ’SHORACL’, oname => ’ CREDIT_CARD ’, column_list => ’ CREDIT_CARD_ID’); end; / |
以下为引用的内容: begin dbms_repcat.generate_replication_support( sname=>’SHORACL’, oname=>’ CREDIT_CARD’, type=>’TABLE’, min_communication=>TRUE); end; / |
以下为引用的内容: create materialized view log on SHORACL. CREDIT_CARD; |
以下为引用的内容: create materialized view log on SHORACL. CREDIT_CARD with rowid excluding new values; |
以下为引用的内容: begin dbms_repcat.resume_master_activity( name=>’sh_rep’); end; / |
以下为引用的内容: disconnect; connect system/passwd@BJ; create user mvadmin identified by mvadmin; begin dbms_repcat_admin. grant_admin_any_schema(username=> ’mvadmin’); end; / grant comment any table to mvadmin; grant lock any table to mvadmin; grant select any dictionary to mvadmin; |
以下为引用的内容: begin dbms_defer_sys.register_propagator( username => ’mvadmin’); end; / |
以下为引用的内容: create public database link ORACLSH using ’oracle.shanghai. com’; |
以下为引用的内容: create public database link ORACLSH using ’(description= (address=(protocol=tcp)(host=127.0.0.1)(port=1521)) (connect_data=(service_name=oracl)))’ |
以下为引用的内容: disconnect; connect mvadmin/mvadmin@BJ; begin dbms_defer_sys.schedule_purge( next_date => sysdate, interval => ’/*1:hr*/ sysdate + 1’, delay_seconds => 0, rollback_segment => ’’); end; |
以下为引用的内容: create database link ORACLSH connect to proxy_bjoracle identified by proxy_bjoralce Connect to ... Identified by ...子句指明用什么用户连接远程数据库 |
以下为引用的内容: begin dbms_defer_sys.schedule_push( destination => ’ora92zjk’,interval => ’/*1:hr*/ sysdate + 1’, next_date => sysdate,stop_on_error => false, delay_seconds => 0,parallelism => 0); end; / |
以下为引用的内容: disconnect; connect system/passwd@BJ; grant alter session to crm; grant create cluster to crm; grant create database link to crm; grant create sequence to crm; grant create session to crm; grant create synonym to crm; grant create table to crm; grant create view to crm; grant create procedure to crm; grant create trigger to crm; grant unlimited tablespace to crm; grant create type to crm; grant create any snapshot to crm; grant alter any snapshot to crm; |
以下为引用的内容: disconnect; connect SHORACL/SHORACL@BJ; create database link ORACLSH connect to ORACL identified by ORACL; |
以下为引用的内容: disconnect; connect mvadmin/mvadmin@BJ; create materialized view SHORACL.CREDIT_CARD refresh fast wit h pr imar y key as sele ct * from ORA CL. CREDIT_CARD@ORACLSH; |
以下为引用的内容: create materialized view SHORACL. CREDIT_CARD refresh fast with rowid as select * from ORACL. CREDIT_CARD@ORACLSH; |
以下为引用的内容: begin dbms_refresh.make ( name => ’mvadmin.sh_refresh’,list => ’’, next_date => sysdate,interval => ’sysdate + 1’, implicit_destroy => false,rollback_seg => ’’, push_deferred_rpc => true,refresh_after_errors => false); end; |
以下为引用的内容: begin dbms_refresh.add (name => ’mvadmin.sh_refresh’,list => ’SHORACL.CREDIT_CARD ’,lax => true); end; / |
以下为引用的内容: a) declare rc binary_integer; begin rc := sys.dbms_defer_sys. purge( delay_seconds=>0); end; b) declare rc binary_integer; begin rc := sys.dbms_defer_sys. push(destination=>’ORACLSH’, stop_on_error=>FALSE, delay_seconds=>0, parallelism=>0); end; c) dbms_refresh.refresh(’"MVADMIN"."SH_REFRESH"’); |
以下为引用的内容: begin dbms_job.run(job_no); end; / |