Monday, 8 December 2014

oracle database links

[oracle@oralinux ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.1.0 Production on Mon Dec 8 20:22:22 2014

Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name from v$database;

NAME
---------
ORCL1

SONY db is remote database service name, make sure listener services needs to run.
SQL> create database link dblink_sony connect to sony identified by sony using 'SONY';

Database link created.

verify the tables from sony database user and sony database
SQL> select * from dbacentre@dblink_sony;

ARTICLES
------------------------------
oracle books
sql books

SQL>

Popular Posts