orcle 远程连接其他数据库 进行查询数据
CREATE PUBLIC DATABASE LINK testlink
CONNECT TO hxka IDENTIFIED BY bjdscoal
USING '(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = 192.168.0.188)(PORT = 1520)))(CONNECT_DATA =(SID = expired)))';
例如:
CREATE PUBLIC DATABASE LINK MYDBLINK
CONNECT TO USER1 IDENTIFIED BY PASSWORD1
USING '(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = 10.10.10.10)(PORT = 1521)))(CONNECT_DATA =(SID = ORA10)))';
drop database to_test
select * from global_name;
select count(*) from sysfun@testlink
create global temporary table foo
( X BLOB )
on commit delete rows;
drop table foo
insert into sysfun select id from sysfun@testlink where Sysfuntype=4