Solved

loading 20 million rows in Oracle

Posted on 2011-03-03
5
662 Views
Last Modified: 2012-06-14
A batch process needs to load 20 million rows from a database table on server 1 , to a database table on server 2.  Both databses are running  on Oracle 10.1.0.5  .
The database column names, definitions and attributes on source and target tables are identical. Other than data pump, do we have any other tools/options available within Oacle to do this?

Thanks...
0
Comment
Question by:Veera_8
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 4

Expert Comment

by:MarioAlcaide
ID: 35028385
Hi,

You could make a DBlink from server2 to server1, and make a CREATE TABLE AS SELECT * FROM table_name@db_link;

I think that will be the fastest way.

Regards
0
 
LVL 18

Accepted Solution

by:
sventhan earned 250 total points
ID: 35028432
You can use SQL Plus COPY command.

This does not require DBlink and its over the wire and please check for any restrictions

http://download.oracle.com/docs/cd/B10501_01/server.920/a90842/apb.htm
0
 
LVL 23

Expert Comment

by:paquicuba
ID: 35031868
Use NOLOGGING with CTAS if you cannot use Oracle data pump as advised above

create table tab nologging as select * from tab@link
0
 
LVL 2

Assisted Solution

by:choukssa
choukssa earned 250 total points
ID: 35041347
If possible, you can use imp/exp or impdp/expdp to get the data exported from source db and imported in destination db.  I am demonstrating expdp

You will have to create a directory
CREATE OR REPLACE DIRECTORY SCOTT_EXP_DIR  AS '/data/backups/scott'

Open in new window


Export the table from the schema

expdp schemas=SCOTT directory=SCOTT_EXP_DIR TABLES=MY_TAB1 dumpfile=MY_TAB1.dmp logfile=MY_TAB1.log

Open in new window


Import the table from the schema

impdp schemas=MARTIN directory=SCOTT_EXP_DIR TABLES=MY_TAB1 dumpfile=MY_TAB1.dmp logfile=MY_TAB1.log TABLE_EXISTS_ACTION=REPLACE

Open in new window

if the table name is same then use the switch TABLE_EXISTS_ACTION =  APPEND or REPLACE
else if it a different then get this table imported when do a  insert from select query and get rid of the table once done

--choukssa
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35041351
choukssa,

From the original question: "Other than data pump,"
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Via a live example, show how to take different types of Oracle backups using RMAN.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question