Can we call procedure (for Truncating Table )from OraBulk

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Mohanram
Participant
Posts: 9
Joined: Tue Jan 30, 2007 5:21 am

Can we call procedure (for Truncating Table )from OraBulk

Post by Mohanram »

Hi all,

Can we call procedure (for Truncating Table )from OraBulk Stage? If so Please let me know how to implement it.
Thanks and Regards,
Mohan Ram.T
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post 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.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Mohanram
Participant
Posts: 9
Joined: Tue Jan 30, 2007 5:21 am

Post 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'
Thanks and Regards,
Mohan Ram.T
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Can we call procedure (for Truncating Table )from OraBul

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Have a stage, (OCI or STP) that executes the stored procedure before your run your bulk load.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Rather than calling a procedure for Truncating Table, explore the property "Loading mode" in the OraBulk Stage to use "TRUNCATE"
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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. :wink:

Other than the manual 'Manual' method I've already mentioned, that is.
-craig

"You can never have too many knives" -- Logan Nine Fingers
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post 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.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Right, it is the Oracle 7 - Orabulk Stage :wink:
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
Post Reply