Oracle DBLink腳本
-- Drop existing database link
drop database link DBLink名稱;
-- Create database link
create database link DBLink名稱
connect to 遠程數據庫用戶名 identified by 密碼-
using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 遠程數據庫IP地址)(PORT = 數據庫端口號))
)
(CONNECT_DATA =
(SERVICE_NAME = 實例名)
)
)';
例:
-- 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)
)
)';
本文出自:億恩科技【www.vbseamall.com】
服務器租用/服務器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質保障!--億恩科技[ENKJ.COM]
|