Solved

import data

Posted on 2016-08-10
5
51 Views
Last Modified: 2016-08-19
I am using a impdp utility via datapump api in a plsql procedure. In the nightly batch load, the plsql procedure completes and moves on to the next job. Since next job kicks in before actual data loading into table is complete because plsql job successfully completed, it is causing side effects and errors in downstream jobs.

Is there a way to wait for all the data to be loaded into table before completing the plsql procedure is complete and move on to next job?

Please let me know
0
Comment
Question by:gs79
5 Comments
 
LVL 23

Expert Comment

by:David
ID: 41751032
I haven't tried this, but perhaps pop the data pump execution into a new shell, and then wait for successful status on its completion before You Exit or move on from the procedure?
0
 
LVL 73

Accepted Solution

by:
sdstuber earned 400 total points
ID: 41751042
by default, when you run START_JOB, it runs in the background.

if you want to wait, then add a call to

DBMS_DATAPUMP.WAIT_FOR_JOB (handle,state);

after the start_job,  handle is the same job handle you used in the start_job,   state is a varchar2 variable.


when the job completes, the state variable will be populated with the "state" of the job when it finished.
2
 
LVL 4

Assisted Solution

by:Abhimanyu Suri
Abhimanyu Suri earned 100 total points
ID: 41751147
0
 

Author Comment

by:gs79
ID: 41757132
@sdstuber thanks. That worked
@Abhimanyu Suri thanks for the link, i will explore more
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 41757168
glad I could help, don't forget to close the question.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need help with Oracle sql and I am using Aqua studio. 8 72
Oracle Pivot Question 8 44
oracle 11g 23 47
database upgrade 8 38
Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

911 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now