NZ sql script calling

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
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

NZ sql script calling

Post by vamsi.4a6 »

I am new to netezza and i have one sql file consists of following statements which we are calling from NZ connector[Read from sql option]


Insert statement1

Update statement1

Updatestatement2


I want all 3 sql statments should be success and if any sql statement is failed i want to rollback all the sql staments that are executed succesfully
Thanks and Regards
Vamsi krishna.v
http://datastage-vamsi.blogspot.in/
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Check the documentation - I believe that separating them with a single semi-colon makes them individual transactions while 'double semi-colons' means all as one transaction.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

Post by vamsi.4a6 »

I believe following settings are sufficient to handle my scenario after reading the documentation and please correct me if i am wrong?

Fail on error=YES

if you specify Fail on error as Yes, all statements are executed as one transaction. If one fails, the statements already executed rolls back and the rest are not executed.

Atomic mode=YES
This property is activated when you specify Fail on error as Yes. The default value for Atomic Mode is Yes and all statements are executed in one transaction.
Thanks and Regards
Vamsi krishna.v
http://datastage-vamsi.blogspot.in/
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Let us know. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

Post by vamsi.4a6 »

Kindly let me know whether my undersanding is correct or not?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Better idea. Why don't you press the Help button when these properties are selected, learn what the possible values are and the effects of each, and report back with your findings?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I was assuming you'd be testing your understanding then letting us know if they were indeed correct or not.
-craig

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