Updated row in DB2 through SPUFI, can we undo this?

RDBMS from IBM and IBM's Hierarchical DBMS and Transaction Manager (IMS DC).
Post Reply
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm

Updated row in DB2 through SPUFI, can we undo this?

Post by Ashish Mathew »

Hi,

I have updated row in DB2 using SPUFI, now how can I revert these changes which I have just done? Is there a way to do it?
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Updated row in DB2 through SPUFI, can we undo this?

Post by Anuj Dhawan »

Short answer is - it depends. And it depends if the COMMIT is executed or not.

Remember SPUFi is a tool. In SPUFI, you can set the defaults where it will prompt you before COMMIT. I leave it on you to check where the option is located - however, you can select AUTOCOMMIT as '?' or 'N'. If you specify '?' SPUFI will ask you to commit at the end, where you can choose not to commit. But if you choose to COMMIT, running other SQL query using the "pre-COMMIT" values is the only solution I can think of.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm

Re: Updated row in DB2 through SPUFI, can we undo this?

Post by Ashish Mathew »

Thanks Anuj. Setting up AUTOCOMMIT as 'to 'N' is what I am using now.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Updated row in DB2 through SPUFI, can we undo this?

Post by Anuj Dhawan »

Glad, you've got it working.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Updated row in DB2 through SPUFI, can we undo this?

Post by enrico-sorichetti »

just remember that using AUTOCOMMIT N will lock the updated rows for the rest of the SPUFI session
or until You force a commit with the proper command
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm

Re: Updated row in DB2 through SPUFI, can we undo this?

Post by Ashish Mathew »

Thanks enrico. You mean to it will lock the row for other users? But once the query is executed successfully, the COMMIT will happen automatically?
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Updated row in DB2 through SPUFI, can we undo this?

Post by enrico-sorichetti »

You mean to it will lock the row for other users?
YES
But once the query is executed successfully, the COMMIT will happen automatically?
we are in a loop here ...
if the commit happened automatically we would be back to the situation You wanted to avoid.
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
Ashish Mathew
Registered Member
Posts: 50
Joined: Thu Jun 27, 2013 6:17 pm

Re: Updated row in DB2 through SPUFI, can we undo this?

Post by Ashish Mathew »

yes... I forgot the main question in the process of learning.. :?
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM DB2 and IMS DB/DC”