Routine to execute Update statment

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
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Routine to execute Update statment

Post by elavenil »

Hi DS Gurus,

Have written a routine to execute an update statement in Oracle 9i. SQLPlus utility is called from the routine and it looked the update command was successful when i execute the routine. When i checked the data, the data in the database not at all updated.

Is there any SQLPlus switch available to enable auto commit ON?

Can you someone enlighten me what is causing this issue.

Thanks in advance for your help.

Regards
Saravanan
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Set AutoCommit ON/OFF
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post by elavenil »

Hi Sainath,

Thanks for your reply.

How do i set that autocommit is ON for that session? When i execute that statement from that routine that call is considered as a session, so autocommit is to be set to that particular session.

Pls let me know how to set that while running that update command.

Regards
Saravanan
ashwin2912
Participant
Posts: 57
Joined: Wed Jan 26, 2005 10:22 pm
Location: India

Post by ashwin2912 »

Try this SQL in your routine

Code: Select all

set autocommit on/off
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

HI,

Put "Set AutoCommit On" before the sql statement. This would help in applying for the current session.

Regards
Sreeni
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post by elavenil »

Thanks for your input. I will try setting 'Autocommit' property as you suggessted. I shall post the results.

Regards
Saravanan
Post Reply