[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
Step2. Host2 confirm Host1 and communication is normal (tnsping)
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
DBlink查询测试
select * from v3.bill@mylink where rownum <21
Using PL/SQL Developer
New DBlinks
Input Information
DBlink query test
Original: Large column [Oracle] [Maintain] how to build DBLink