Create dblink link oracle in Dameng

1. Need to configure oracle oci client

First download the oracle client from the oracle official website 

instantclient-basic-linux.x64-12.2.0.1.0

After downloading, unzip will be the following types of files 

Then copy several files with so to /lib64 of the linux system where Dameng database is installed, and then create a soft connection:

ln -s libclntsh.so.12.1 libclntsh.so 

The above steps are completed.

2. Log in to reach the dream database to create a dblink   

Create a dblink in the DM management tool through the following statement  

create or replace public link "TEST" connect 'oracle' with "QZ_S_ZHJG" identified by "123456"  using '111.111.111.1/orcl';
 

TEST is the name of the created dblink, oracle is the database type to be linked, QZ_S_ZHJG is the user name of the linked database, 123456 is the password 
111.111.111.1 is the ip address, and orcl is the example name.

So far dblink is created successfully  

When testing, you can use the following statement to test 

SELECT TOP 100 * FROM QZ_S_ZHJG.S_ENT@TEST

 

 

Guess you like

Origin blog.csdn.net/qq_37823979/article/details/105972585