Exporting rows in Oracle
I need to export a number of rows (from different tables- ie, all the related information about an entity - for eg: a Customer) to another DB in Oracle. How d开发者_运维问答o we do this? I am using a windows OS. Please help. Thank you all, Pradeep
While connected to database 1 you could also create a database link to database 2 (if you have rights to do so - there were no assumptions on this) and insert to your tables by selecting from your link e.g. like this
CREATE DATABASE LINK foo
CONNECT TO <user> IDENTIFIED BY <password>
USING '<connect string>';
select * from table1@foo;
Further information:
A database link is a connection between two physical database servers that allows a client to access them as one logical database.
See Dabtabase links at Oracle Database Administrator's Guide.
You can use Oracle's export and import utilities
You might want to give Data Pump a try as well (depending on your version). Many options for moving around data from Oracle -> Oracle dbs
Another option is the SQL*Plus copy command. It's not very fast, but it can be very convenient in certain contexts.
Oracle's SQL developer tool has the option to export data as insert statements.
精彩评论