Posted on 2011-03-24 11:16
sailor 阅读(151)
评论(0) 编辑 收藏 所属分类:
oracle
CREATE PUBLIC DATABASE LINK sxst03
(连接名称) CONNECT TO sxdznydfd
(用户名) IDENTIFIED BY sxdznydfd
(密码)USING
'(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.3
(数据库所在机子的名称或IP))(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = sxst
(要连接数据库的SID))
)
)'
下面是查询时的写法,在表名后增加
@sxst03 (@加上上面建立的连接名称)
select * from
sde.Table_Registry@sxst03 where table_name='N2007E2003140411000B00XJLYD'