Distributed Management of Oracle's blocking Mechanism

Source: Internet
Author: User

Multiple ORACLE databases physically stored in the network can be logically considered as a single large number.
Database. Users can access data in remote databases through the network at the same time, while
Collaborative processing is completely transparent for workstation users and applications: developers do not need to worry about
Network connection details, no need to care about the specific distribution of data in the network contacts, and no need to care about the server
The coordination process between servers.

The links between databases are established on the database link. To create a db link, you must first
Set the link string on each database server.

For example, the ORACLE database of Shenzhen SUN platform contains the following in/var/opt/oracle/tnsnames. ora:
A database link to Beijing, in the following format:

Link string settings

Description

Tobeijing = (description = Database link name: tobeijing
(Address = (protocol = tcp) TCP/IP protocol
(Host = www.bj.col.com.cn) Host Name or IP address to be linked
(Port = 1521 )) Network port 1521
(Connect_data = (sid = oracle7 ))) Sid used to install ORACLE

Go to the system administrator SQL> operator and run the following command:

SQL> create public database link beijing connect to scott identified by tiger
Using 'tobeijing ';

Then a link beijing with scott user and beijing database is created. We query scott data in beijing:

SQL> select * from emp @ beijing;

In this way, the data of scott users in Shenzhen and Beijing can be processed as a whole.

To make distributed operations more transparent, the ORACLE database has a synonym object synonym.

SQL> create synonym bjscottemp for emp @ beijing;

Therefore, you can use bjscottemp to replace the Distributed Link operation with the @ symbol emp @ beijing.

View All database links, go to the system administrator SQL> operator, and run the following command:

SQL> select owner, object_name from dba_objects where object_type = 'database link ';

Create an ORACLE snapshot log:
SQL> create snapshot log on table3 with primary key;

Create a snapshot:
SQL> create snapshot table3beijing refresh force start with sysdate
Next sysdate + 1/24 with primary key as select * from table3 @ beijing;

There are three refresh methods for ORACLE snapshot refresh:

Fast Fast refresh. Use the snapshot log to update only the time period changes.
Complete Completely refresh and run SQL statements
Force Automatic refresh judgment, between fast and complete

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.