Title: Distributed Oracle Databases
1Distributed Oracle Databases
- By
- Yemi Ogunrombi
- IS8030 - Integrated Computing Systems
- Professor - Dr Hoganson
2Distributed Oracle Databases
- A distributed database is a set of databases
stored on multiple computers that typically
appears to applications as a single database. - Consequently, an application can simultaneously
access and modify the data in several databases
in a network.
3Distributed Oracle Databases
- Each Oracle database in the system is controlled
by its local Oracle Server but cooperates to
maintain the consistency of the global
distributed database.
4Distributed Oracle Databases
- A database server is the Oracle software managing
a database, and a client is an application that
requests information from a server. - Each computer in a system is a node.
- A node in a distributed database system act as a
client, a server, or both, depending on the
situation.
5Net8
- All Oracle databases in a distributed database
system use Oracle's networking software, Net8, to
facilitate inter-database communication across a
network. - Net8 allows database servers to communicate
across networks to support remote and distributed
transactions in a distributed database.
6Database Names
- Each database in a distributed database is
distinct from all other databases in the system
and has its own distinct global database name. - Oracle forms a database's global database name by
prefixing the database's network domain with the
individual database's name.
7Database Links
- To facilitate application requests in a
distributed database system, Oracle uses database
links. - A database link defines a one-way communication
path from an Oracle database to another database.
8Distributed Processing
- Distributed processing occurs when an application
system distributes its tasks among different
computers in a network. - Distributed database applications typically use
distributed transactions to access both local and
remote data and modify the global database in
real-time.
9Database Replication
- Replication is the process of copying and
maintaining database objects in multiple
databases that make up a distributed database
system. - Most commonly, replication is useful to improve
the performance and protect the availability of
applications because alternate data access
options exist.
10Heterogeneous Distributed Databases
- In a heterogeneous distributed database system at
least one of the databases is a non-Oracle
system. - Oracle Open Gateways provide access to the
non-Oracle system from an Oracle Server. - The Oracle Server, together with the gateway,
provides full heterogeneity transparency to the
application.
11Distributed Database Applications
- A distributed query retrieves information from
two or more nodes. - A distributed transaction is a transaction that
includes one or more statements that,
individually or as a group, update data on two or
more distinct nodes of a distributed database.
12Two-Phase Commit Mechanism
- Oracle's two-phase commit mechanism guarantees
that all database servers participating in a
distributed transaction either all commit or all
roll back the statements in the transaction. - The two phases are
- Prepare Phase
- Commit Phase
13Two-Phase Commit-Prepare Phase
- The first phase in committing a distributed
transaction is the prepare phase in which the
commit of the transaction is not actually carried
out. Instead, all nodes referenced in a
distributed transaction (except one, known as the
commit point site, ) are told to prepare (to
commit). - By preparing, a node records enough information
so that it can subsequently either commit or
abort the transaction (in which case, a rollback
will be performed), regardless of intervening
failures.
14Two-Phase Commit-Prepare Phase
- When a node responds to its requestor that it has
prepared, the prepared node has made a promise to
be able to either commit or roll back the
transaction later and not to make a unilateral
decision on whether to commit or roll back the
transaction.
15Two-Phase Commit-Prepare Phase
- When a node is told to prepare, it can respond
with one of three responses - Prepared Data on the node has been modified by a
statement in the distributed transaction, and the
node has successfully prepared. - Read-onlyNo data on the node has been, or can
be, modified (only queried), so no prepare is
necessary. - AbortThe node cannot successfully prepare.
16Two-Phase Commit-Prepare Phase
- To complete the prepare phase, each node performs
the following actions - The node requests its descendants (nodes
subsequently referenced) to prepare. - The node checks to see if the transaction changes
data on that node or any of its descendants. If
there is no change, the node skips the next steps
and replies with a read-only message
17Two-Phase Commit-Prepare Phase
- The node allocates all resources it needs to
commit the transaction if data is changed. - The node flushes any entries corresponding to
changes made by that transaction to its local
redo log. - The node guarantees that locks held for that
transaction are able to survive a failure. - The node responds to the node that referenced it
in the distributed transaction with a prepared
message or, if its prepare or the prepare of one
of its descendents was unsuccessful, with an
abort message
18Two-Phase Commit-Commit Phase
- The second phase in committing a distributed
transaction is the commit phase. - Before this phase occurs, all nodes referenced in
the distributed transaction have guaranteed that
they have the necessary resources to commit the
transaction. That is, they are all prepared.
19Two-Phase Commit-Commit Phase
- The commit phase consists of the following steps
- The global coordinator send a message to all
nodes telling them to commit the transaction. - At each node, Oracle8 commits the local portion
of the distributed transaction (releasing locks)
and records an additional redo entry in the local
redo log, indicating that the transaction has
committed. - When the commit phase is complete, the data on
all nodes of the distributed system are
consistent with one another.
20Conclusion
- Distributed Oracle Databases allow applications
to transact across various systems and network
topologies, and ensures that consistency is
maintained amongst these databases using the
two-phase commit principle when updating.
21Bibliography
- www.csee.umbc.edu/help/oracle8/server803/A54653_01
/toc.htm - technet.oracle.com/products/rdb7/htdocs/fs_dist.ht
m