日期:2014-05-16  浏览次数:20489 次

create database link 并比较两个数据库中不同的表名称

create database link dbser_link
????? connect to huike identified by huike
????? using '(DESCRIPTION =
?????? (ADDRESS_LIST =
??????? (ADDRESS = (PROTOCOL = TCP)(HOST = 10.22.1.248)(PORT = 1521))
?????? )
?????? (CONNECT_DATA =
??????? (SERVICE_NAME = orcl)
?????? )
????? )';
?

select t.table_name from user_tables@DBSER_LINK? t where t.table_name not in (select tt.table_name from user_tables tt)