Prev | Current Page 885 | Next

Richard Niemiec

"Oracle Database 10g Performance Tuning Tips & Techniques"

Suppose you attempt to create a
database link in OE??™s account, as shown here:
create database link OE.HR_LINK
connect to HR identified by OE2HR
using 'hq';
In this case, Oracle will not create the HR_LINK database link in OE??™s account. Instead, Oracle
will create a database link named OE.HR_LINK in the account that executed the create database
link command. To create private database links, you must be logged into the database in the
account that will own the link.
NOTE
To see which links are currently in use in your session, query
V$DBLINK.
Managing Database Triggers
If your data replication needs require synchronized changes in multiple databases, you can use
database triggers to replicate data from one table into another. Database triggers are executed when
specific actions happen. Triggers can be executed for each row of a transaction, for an entire
transaction as a unit, or when system-wide events occur. When dealing with data replication,
you will usually be concerned with triggers affecting each row of data.
Before creating a replication-related trigger, you must create a database link for the trigger to
use. In this case, the link is created in the database that owns the data, accessible to the owner of
the table being replicated:
Chapter 17: Managing Distributed Databases 611
create public database link TRIGGER_LINK
connect to current_user
using 'rmt_db_1';
This link, named TRIGGER_LINK, uses the service name RMT_DB_1 to specify the connection to
a remote database.


Pages:
873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897
promocja calivita paraprotex calivita pompy ciepła wrocław