Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle dblink creation

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Oracle 11G R2

Instance 1: 192.168.1.211 instance name: feng

Instance 2: 192.168.1.212 instance name: wan

Now you need to dblink instance 2 to query the data above instance 1.

Oracle administrator user system and password oracle for example 1

Modify above instance 2

Vim / data/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora

Increase

REFENG =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.211) (PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = feng)

)

)

Then sqlplus / as sysdba, create the dblink

Create public database link feng CONNECT TO system IDENTIFIED BY "oracle" USING 'REFENG'

Note: the above passwords must be in double quotation marks, otherwise the username password may be correct, but the username password may be incorrect.

Delete dblink

Drop public database link feng

View dblink that has been created

Select owner,object_name from dba_objects where object_type='DATABASE LINK'

Query data

Select * from users. Table @ dblink name

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report