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

The creation of Oracle Advanced Learning dblink

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

In this article, the author briefly explains that when Oracle creates a dblink,dblink, it is to operate directly on another database in one database. It sounds wonderful, but in fact it is not difficult to achieve. We just need to create a dblink on this database and associate it to another database. Let's cut the gossip and go straight to the example:

If we are using database An and we want to operate on database B, we only need to execute the following statement:

The first B represents the name of the dblink created on A, the second B represents the user name of the B database, pwd is the password, IP,port of host is the port number of B data, and service_name is the instance name of B. after execution, the creation is completed.

Create public database link B

Connect to B identified by pwd

Using'(DESCRIPTION =

(ADDRESS_LIST =

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

)

(CONNECT_DATA =

(SERVICE_NAME = orcl)

)

)'

After the creation is completed, we can operate the B database on A.

Example:

Select * from b_table@B

Query all the data of the b _ table table of B data on the A database.

Knowing this, we can do what we want to do, you know, I hope it will help us all.

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