Solved

import data

Posted on 2016-08-10
5
50 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.

Join & Write a Comment

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
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.
Via a live example, show how to take different types of Oracle backups using RMAN.

747 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

10 Experts available now in Live!

Get 1:1 Help Now