[Oracle] [Maintain] how to build DBLink

[Oracle] [Maintain] how to build DBLink


Suppose we need OracleDB1 queries on Host2 host a DB Table-related data on Host1 host,

Through DBLink I believe that would be the best choice, and the entire setup process will not be very complicated, look at their own record.

Environmental information (assumptions):

Host1 IP:222.222.222.111 tns_ServiceName=DB1

Host2 IP:222.222.222.11 tns_ServiceName=DB2

Step1. Host1 confirmation of the existence of DB2 tns_ServiceName tnsnames.ora

image

Step2. Host2 confirm Host1 and communication is normal (tnsping)

image

Step3 Create DBlink (OK Create DBLink account has permissions)

Using SQL

create public database link mylink
 
connect to v3 identified by 123456
 
using 'tns_ServiceName'; --DB2


image image 
DBlink查询测试
select * from v3.bill@mylink where rownum <21


 image

Using PL/SQL Developer

New DBlinks

image

Input Information

image

DBlink query test

image

Original: Large column  [Oracle] [Maintain] how to build DBLink


Guess you like

Origin www.cnblogs.com/petewell/p/11445554.html