create database link bill.CHINACACHE
connect to USERID
IDENTIFIED BY PASSWORD
using '(DESCRIPTION=(ADDRESS = (PROTOCOL = TCP)(HOST = *.*.*.*)(PORT = 1521))(CONNECT_DATA=(SID=billbj1)(SERVER = DEDICATED)))';
使用:
select filename from LOG_FILENAME@bill.CHINACACHE t where t.filename like '%billing%' and t.createtime<=to_date('"+old_long1+" 23:59:59','yyyy-mm-dd hh24:mi:ss') and t.createtime>=to_date('"+old_long2+" 00:00:00','yyyy-mm-dd hh24:mi:ss')