Create a database link

********** create a database link ******************
the CREATE DATABASE LINK "name"
the CONNECT the TO "username" IDENTIFIED BY VALUES 'password'
the USING '(the DESCRIPTION =
(ADDRESS_LIST =
(aDDRESS = (PROTOCOL = TCP) (HOST = ip address) (PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = the DB2 database service name)
)
)'
*** ******** db_one taken from the library a library data
select * from test @ db_one;

test table is a table db_one library, sql A look at the library

 

 

Guess you like

Origin www.cnblogs.com/foreverstudy/p/11848635.html