Solved

loading 20 million rows in Oracle

Posted on 2011-03-03
5
661 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
exp/imp 25 101
Can't Access My Database 57 88
oracle- set role and grant privileges 6 51
how to find out the count of records based on the subfolders paths 11 40
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
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 explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

730 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