Oracle Enterprise Close Command

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Kel
Participant
Posts: 31
Joined: Mon May 11, 2015 3:20 am
Location: Robinsons Cybergate Tower 2
Contact:

Oracle Enterprise Close Command

Post by Kel »

Hi Everyone,

I like to ask for help on using Close Command on Oracle Enterprise Stage. What I need to do is to update a table using Close Command.

We are not allowed to use UPSERT method because of large volume of data. So we are using Write Method = Load, Write Mode = Truncate.

Can anyone point me on some codes where on Datastage they are using Close Command To update table. I have no luck on googling it.


Thanks.
(No flaming please. Datastage Noob here).
BOG
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I am unclear as to why you want or need a CLOSE command - which I have used only with cursor processing - which doesn't apply here.

Note that even with UPSERT you can choose your commit frequency and thus process large amounts of data without running risk of rollback space problems.

Are you having problems with using the LOAD method with TRUNCATE of the table?
Kel
Participant
Posts: 31
Joined: Mon May 11, 2015 3:20 am
Location: Robinsons Cybergate Tower 2
Contact:

Post by Kel »

Hi ArndW, I checked again and Write mEthod = Load, Write Mode = Append.
I dont know but the analyst said that we dont use Upsert on updating the table.
BOG
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If you are doing a standard Oracle LOAD method then there is no need for any specific cursor handling and CLOSE statement. Have you tried running the job?
Kel
Participant
Posts: 31
Joined: Mon May 11, 2015 3:20 am
Location: Robinsons Cybergate Tower 2
Contact:

Post by Kel »

Hi ArndW

We have not tried testing the job. My colleague mentioned that if our insert failed, we need to rollback the data. And commit if the insert is successful.
BOG
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Since you are truncating the table, the issue of rollback on failure is moot; but DataStage will do a rollback for you. Perhaps it might be best to write this job and see if it meets your requirements, and if it doesn't you can post any questions you might have on this forum.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Kel wrote:And commit if the insert is successful.
You don't as DataStage will do that automatically. No need to leverage the CLOSE command for that. Arnd already covered rollback.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply