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.enkj.com】
服务器租用/服务器托管中国五强!虚拟主机域名注册顶级提供商!15年品质保障!--亿恩科技[ENKJ.COM]
|