A库想查B库的东西可以在A库上建一个DBLINK,单向,不需要在B上建,除非B也想查A的东西
然后只要SELECT * FROM TABLE_NAME@DBLINK_NAME就可以了
建DBLINK语句:
CREATE [SHARED] [PUBLIC] database link link_name
[CONNECT TO [user] [current_user] IDENTIFIED BY password]
[AUTHENTICATED BY user IDENTIFIED BY password]
[USING 'connect_string']
一般是PUBLIC
实例:
create public database link "DBLINK_TEST"
connect to A
identified by "A"
using '127.0.0.1:1521/A'
这样可以把对方表备份到我们库里,就是不用卸数成文件,直接搞进来