在oracle9i下创建database Link:
1.已经配置了本地服务:
create database link dbl_customer
connect to customer
identified by neu using 'cc';
connect to customer
identified by neu using 'cc';
CREATE DATABASE LINK数据库链接名CONNECT TO 用户名 IDENTIFIED BY 密码 USING ‘本地配置的数据的实例名’;
2.未配置本地服务:
create database link dbl_customer
connect to customer identified by customer
using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 196.168.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SID = cc)
(SERVER = DEDICATED)
)
)';
在oracle10g下可以用简化的语句:
create database link dbl_customer
connect to customer identified by customer
using '192.168.0.1:1521/cc';
本文介绍在Oracle 9i和10g中创建database link的方法,包括已配置本地服务的情况及未配置的情况,并提供了简化的创建语句。
1483

被折叠的 条评论
为什么被折叠?



