1、已經配置本地服務
create public database link sid connect to userid identified by password using 'sid'
CREATE DATABASE LINK 數據庫鏈接名 CONNECT TO 用戶名 IDENTIFIED BY 密碼 USING 『本地配置的數據的實例名』;
2.未配置
CREATE DATABASE LINK "DB_LINK.NAME"
CONNECT TO username
IDENTIFIED BY password
USING '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST=IP)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = sid)
)
)';
3.Drop
DROP DATABASE LINK "DB_LINK.NAME";
沒有留言:
張貼留言