In many cases you might need to compare data between tables across different databases. For example your test instance and production instance.
You can easily create a database link between the 2 instances and be able to access the production data from the test database.
CREATE DATABASE LINK <Link Name>
CONNECT TO <Schema Name>
IDENTIFIED BY <PWD>
USING '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = <Host Name>)(PORT = <port#>))
)
(CONNECT_DATA =
(SERVICE_NAME = <Database Name>)
)
)';
转载于:https://www.cnblogs.com/GoDevil/archive/2008/08/07/1262748.html