Advertisement

03.06.2008 at 05:24AM PST, ID: 23219369
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.8

Oracle procedure for bulk extract

Asked by shreyamenon in Oracle 10.x

Tags:

All, I have a requirement to do a bulk extract,nightly extract from 5 of our tables and insert the data using a dblink to a rempte database. All,
I have a requirement like this
1. I will have upto 200 Ids[unique] in Table A, the extract should read the ids from Table A and then extract data from 5 other tables where id=ids from table A. After extracting data the data needs to be loaded in remote tables[same tables as of table b,c,d and e] using a dblink and those ids which are succesfully extracted should be deleted from Table A. I was thinking about creating a cursor and then iterate through the cursor and then extract data from other tables.
Curosr- select id from Table A
iterate thru the cursor and then
select * from table b where id=..
select * from table c where id =
select * from table d where id=
select * from table e where id=

2. Question is Is it a good appraoch ? For each id there can be tons of records in other tables
Example: Table b can have 30000 records for id1
Table C can have 35000 recods for id1
Table D can have 20000 records for id1
Table E can have 30000 records for id1
Similiarly there can be upto 200 Ids and then huge extracts for all the ids from different tables, This will be a batch extract and will be done during off hours.
How can this be handled efficiently ?

Can a cursor handle it ?
Can anyone suggest me some efficient ways ?

rather than using a cursor I tried a simple insert also, like this
INSERT INTO
x_test(x1,x2,x3,x4,x5,x6,x7,x8)
SELECT
x1,x2,x3,x4,x5,x6,x7,x8 from
x
where id in (select id from log_x); [For one table only I tried it, not the 5 tables], The problem is if an id fails to get processed how will I keep track of that ? Because after a succesful extract I have to delete those ids which are extracted from log table also.


Thanks Start Free Trial
 
Loading Advertisement...
 
[+][-]03.07.2008 at 06:29AM PST, ID: 21070279

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Oracle 10.x
Tags: Oracle
Sign Up Now!
Solution Provided By: sdstuber
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628