创建DBLink和同义词
--创建全局link
create
public
database
link pms
connect
to
pms
identified
by
pms using
'TESTDB'
CREATE
PUBLIC
DATABASE
LINK 数据库链接名
CONNECT
TO
用户名 IDENTIFIED
BY
密码 USING ‘本地配置的数据的实例名’;
--测试本地的新数据库链接名是否可用
select
*
from
project@pms;
--创建同义词
create
public
synonym ProjectExtendInfo
for
ProjectExtendInfo@pms;
create
public
synonym Project
for
Project@pms;
--清除时的操作
drop
public
synonym Project;
drop
public
synonym ProjectExtendInfo;
DROP
PUBLIC
DATABASE
LINK pms;