oracle database establishes dblink syntax on the client side

  • 2021-07-10 21:04:36
  • OfStack

When the oracle server does not set up an TNS for the target database, the syntax for setting up an dblink on the client (with permission) is as follows:

 
create database link dblink_name connect to user_name identified by user_psw using 
'(DESCRIPTION = 
(ADDRESS_LIST = 
(ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xx.xxx.xx)(PORT = 1521)) 
) 
(CONNECT_DATA = 
(SERVICE_NAME = orcl) 
) 
)' 


Related articles: