简体   繁体   中英

How can I copy from Oracle to Sybase using SQL*Plus?

I have an application that stores data in an Oracle database. I want to copy selected rows from a table in this database to a table in a Sybase database (archiving records). Can I do this directly (ie without storing and loading results from a file)?

I've mostly looked into SQL*Plus

  • SQL*Plus COPY Command (http://docs.oracle.com/cd/B19306_01/server.102/b14357/apb.htm)
  • Copying Data from the Oracle Database Server to Sybase (http://docs.oracle.com/cd/A95432_01/a80982/ch5.htm#153526)
  • Copy Command (http://www.oracleutilities.com/SQLPLus/copy.html)
  • Oracle® Database Gateway for Sybase User's Guide (http://docs.oracle.com/cd/B28359_01/gateways.111/b31048/toc.htm)

I also understand the following: "However, INSERT is the only option supported when copying to Sybase. The SQL*Plus COPY command does not support copying to tables with lowercase table names." However, I haven't been able to do this in SQL*Plus. I'll keep trying, but if anyone has an example of how to do it here, I'd very much appreciate it.

If this is not possible, is Oracle Data Pump (http://www.oracle.com/technetwork/database/enterprise-edition/index-093639.html) my best alternative?

Thank you!

Sincerely,

Deepyaman

The robust way to do this is create a flat file(txt,csv) or an INSERT sql from your "COPY_FROM_DATABASE". And then load it into corresponding table. You might have to do a bit of formatting in this sql in order to run it on a different server. I personally like INSERT sql better.

Your best bet may be to use some form of ETL tool to handle this if the size of your data is reasonable, rather than getting into the details of setting up the gateways, etc, between systems.

There are many options - Talend Open Studio (free), Informatica, or Microsoft SSIS all should be able to handle this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM