TNS連接遠程計算機的設置。SYNO為遠程計算機的SID
PMSYNO.BJ.COM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.203)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = SYNO)
)
)
然後建立連接數據庫語句:
CREATE DATABASE LINK link_name(任意啟名)
CONNECT TO username
IDENTIFIED BY passWord
USING sql_string;
例如:CREATE DATABASE LINK pm_syno CONNECT TO pmexp IDENTIFED BY pmexp USING syno(前面TNS配好的那個);
使用遠程數據庫的表時用 :tablename@link_name