Page 1 of 1
Can we call procedure (for Truncating Table )from OraBulk
Posted: Fri Feb 16, 2007 1:59 am
by Mohanram
Hi all,
Can we call procedure (for Truncating Table )from OraBulk Stage? If so Please let me know how to implement it.
Posted: Fri Feb 16, 2007 4:11 am
by kumar_s
Hi Mohan,
No need a procedure just for Truncation. You can use "Truncate Table Before insert rows" update action available in OCI stage. If you tend to just truncate, you can do in Before/After sql as well. Or you can even pass some blank records with this option.
Posted: Fri Feb 16, 2007 4:31 am
by Mohanram
Thanks for the suggestion
But what I want is Can we call a procedure in Orabulk Stage .WE DONT HAVE TRUNCATE PRIVILAGE.All we want to do is to create a store procedure and call the procedure in the stage
We can even create table in OraBulk Stage By making
'insertion mode=TRUNCATE'
Re: Can we call procedure (for Truncating Table )from OraBul
Posted: Fri Feb 16, 2007 7:37 am
by chulett
Mohanram wrote:Can we call procedure (for Truncating Table )from OraBulk Stage?
No. You'll need to find some other place to do that, like a Stored Procedure stage. Or switch it to 'Manual' mode and tweak the generated control file before you launch sqlldr.
Posted: Fri Feb 16, 2007 7:49 am
by DSguru2B
Have a stage, (OCI or STP) that executes the stored procedure before your run your bulk load.
Posted: Fri Feb 16, 2007 10:22 am
by narasimha
Rather than calling a procedure for Truncating Table, explore the property "Loading mode" in the OraBulk Stage to use "TRUNCATE"
Posted: Fri Feb 16, 2007 10:29 am
by chulett
Ok... I've explored it and found two choices: Manual and Automatic. Please explain how either of them
directly allow this problem to be solved.
Other than the manual 'Manual' method I've already mentioned, that is.
Posted: Fri Feb 16, 2007 10:54 am
by narasimha
I just did a quick test. Choose TRUNCATE in the available options(INSERT, REPLACE, APPEND AND TRUNCATE) in the Loading mode.
It worked fine.
Posted: Fri Feb 16, 2007 11:06 am
by chulett
Ok, I see... you are looking at the Oracle 7 Load stage. That's an important distinction to make, my friend.
Besides the fact that it is for Oracle 7, I don't think that stage is even documented anywhere, at least not anywhere I could find. And from what I recall is painful to get working. It may 'work fine' for you because of the pain I went through back in the day.
Posted: Fri Feb 16, 2007 11:18 am
by narasimha
Right, it is the
Oracle 7 - Orabulk Stage
![Wink :wink:](./images/smilies/icon_wink.gif)