Evolution of Oracle replication methods

Source: Internet
Author: User

The following article mainly introduces the Oracle replication method in detail, which involves the connection of public databases during the running process. It requires three database connections for each replication, and the global name of the database specified by the public database connection.

Set the materialized view site:

1. Create a replication administrator and grant the following permissions:

 
 
  1. disconnect;  
  2. connect system/passwd@BJ;  
  3. create user mvadmin identified by  
  4. mvadmin;  
  5. begin  
  6. dbms_repcat_admin.  
  7. grant_admin_any_schema(username=> ’mvadmin’);  
  8. end;  
  9. /  
  10. grant comment any table to mvadmin;  
  11. grant lock any table to mvadmin;  
  12. grant select any dictionary to mvadmin;  

Registered advertiser:

 
 
  1. begin  
  2. dbms_defer_sys.reGISter_propagator(  
  3. username => ’mvadmin’);  
  4. end;  
  5. /  

Public database connection. Three database connections are required for each replication. The global name of the specified database for public database connection:

 
 
  1. create public database link ORACLSH using ’Oracle.shanghai.  
  2. com’;  

The Using clause is followed by the global database name or connection string.

 
 
  1. create public database link ORACLSH using ’(description=  
  2. (address=(protocol=tcp)(host=127.0.0.1)(port=1521))  
  3. (connect_data=(service_name=oracl)))’   

Create a job to clear delayed transaction queue scheduling:

 
 
  1. disconnect;  
  2. connect mvadmin/mvadmin@BJ;  
  3. begin  
  4. dbms_defer_sys.schedule_purge(  
  5. next_date => sysdate,  
  6. interval => ’/*1:hr*/ sysdate + 1’,  
  7. delay_seconds => 0,  
  8. rollback_segment => ’’);  
  9. end;   

Create a database connection for the Oracle replication administrator mvadmin:

 
 
  1. create database link ORACLSH connect to proxy_bjOracle  
  2. identified by proxy_bjoralce  
  3. Connect to ... Identified by ...  

Clause specifies which user is used to connect to the remote database

Create an Oracle replication and scheduling database connection job:

 
 
  1. begin  
  2. dbms_defer_sys.schedule_push(  
  3. destination => ’ora92zjk’,interval => ’/*1:hr*/ 
    sysdate + 1’,  
  4. next_date => sysdate,stop_on_error => false,  
  5. delay_seconds => 0,parallelism => 0);  
  6. end;  
  7. /  

Grant the shyml user (corresponding to the shyml solution) the corresponding permissions to create the Materialized View:

 
 
  1. disconnect;  
  2. connect system/passwd@BJ;  
  3. grant alter session to crm;  
  4. grant create cluster to crm;  
  5. grant create database link to crm;  
  6. grant create sequence to crm;  
  7. grant create session to crm;  
  8. grant create synonym to crm;  
  9. grant create table to crm;  
  10. grant create view to crm;  
  11. grant create procedure to crm;  
  12. grant create trigger to crm;  
  13. grant unlimited tablespace to crm;  
  14. grant create type to crm;  
  15. grant create any snapshot to crm;  
  16. grant alter any snapshot to crm;  

The above content is an introduction to the Oracle replication method, and I hope you will get some benefits.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.