Get the App
SLTechnology News&Howtos  ›  Database  › 

The creation of Oracle Advanced Learning dblink

Shulou Source: shulou.com Published: 2022-06-01 06:01:06 11月13日 Update

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.

Tags: Data database representative instance wonderful thing slogan name password that is user user name author statement association help query learning advanced Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS vpn Redmi MySQL Xiaomi