Updated row in DB2 through SPUFI, can we undo this?
-
- Registered Member
- Posts: 50
- Joined: Thu Jun 27, 2013 6:17 pm
Updated row in DB2 through SPUFI, can we undo this?
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?
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?
- Anuj Dhawan
- Founder
- Posts: 2802
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Updated row in DB2 through SPUFI, can we undo this?
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.
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.
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.
-
- Registered Member
- Posts: 50
- Joined: Thu Jun 27, 2013 6:17 pm
Re: Updated row in DB2 through SPUFI, can we undo this?
Thanks Anuj. Setting up AUTOCOMMIT as 'to 'N' is what I am using now.
- Anuj Dhawan
- Founder
- Posts: 2802
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Updated row in DB2 through SPUFI, can we undo this?
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.
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.
-
- Global Moderator
- Posts: 826
- Joined: Wed Sep 11, 2013 3:57 pm
Re: Updated row in DB2 through SPUFI, can we undo this?
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
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
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
-
- Registered Member
- Posts: 50
- Joined: Thu Jun 27, 2013 6:17 pm
Re: Updated row in DB2 through SPUFI, can we undo this?
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?
-
- Global Moderator
- Posts: 826
- Joined: Wed Sep 11, 2013 3:57 pm
Re: Updated row in DB2 through SPUFI, can we undo this?
YESYou mean to it will lock the row for other users?
we are in a loop here ...But once the query is executed successfully, the COMMIT will happen automatically?
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
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
-
- Registered Member
- Posts: 50
- Joined: Thu Jun 27, 2013 6:17 pm
Re: Updated row in DB2 through SPUFI, can we undo this?
yes... I forgot the main question in the process of learning..
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