Oracle DBLink腳本
-- Drop existing database link
drop database link DBLink名稱;
-- Create database link
create database link DBLink名稱
connect to 遠(yuǎn)程數(shù)據(jù)庫(kù)用戶名 identified by 密碼-
using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 遠(yuǎn)程數(shù)據(jù)庫(kù)IP地址)(PORT = 數(shù)據(jù)庫(kù)端口號(hào)))
)
(CONNECT_DATA =
(SERVICE_NAME = 實(shí)例名)
)
)';
例:
-- Drop existing database link
drop database link TEST_DBLINK;
-- Create database link
create database link TEST_DBLINK
connect to test identified by test
using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 111.111.111.111)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = test)
)
)';
本文出自:億恩科技【mszdt.com】
服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]
|