如何在两个Oracle实例之间创建数据库链接 [英] How to create a DB link between two oracle instances
本文介绍了如何在两个Oracle实例之间创建数据库链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在两个Oracle实例之间创建数据库链接.假设A和B是两个实例.我想从实例A访问实例B中的数据.
How to create a DB link between two Oracle instances. Let's say A and B are two instances. I want to access the data in instance B from the instance A.
推荐答案
如果您要从实例A访问实例B中的数据,那么这就是查询, 您可以编辑自己的凭据.
If you want to access the data in instance B from the instance A. Then this is the query, you can edit your respective credential.
CREATE DATABASE LINK dblink_passport
CONNECT TO xxusernamexx IDENTIFIED BY xxpasswordxx
USING
'(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=xxipaddrxx / xxhostxx )
(PORT=xxportxx))
(CONNECT_DATA=
(SID=xxsidxx)))';
执行此查询访问表后
SELECT * FROM tablename@dblink_passport;
您可以执行DML,DDL,DQL的任何操作
You can perform any operation DML, DDL, DQL
这篇关于如何在两个Oracle实例之间创建数据库链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文