In terms of performance, it is almost certainly more efficient to use a database link. Otherwise, your Java process will need to pull the data over the network from the Oracle database, and then write it back over the network to the SQL Server database. A direct connection will only require a single trip through the network.
From a maintenance point of view, a database link tends to result in significantly less coding. It is much easier to write.
INSERT INTO destinationTable@sqlServer( <<column list>> )
SELECT <<column list>>
FROM sourceOracleTable
than doing the same thing in Java, even if all JDBC is done using the ORM level.
source
share