-
Contributing Member
Retrieve after roll back
I have a doubt...
Here goes
If i add a row to a table, and wont use the command commit.
When i delete that particular row, and use roll back will i be able to retrive it?
Actually I need explanation abt working of roll backk?
-
Re: Retrieve after roll back
Your question is really intresting.
But you will not be able to retrive that record.
Actually tilll u commit the transactions are stored in memory not in actual database table. when u delete it is deleted from there.
So no chance of tetriving it back.
-
Contributing Member
Re: Retrieve after roll back
u will not get datas because u have not use commit for insert rows so u have used rollback that time full session rollback or after commit.
so hence use savepoint.
-
Contributing Member
Re: Retrieve after roll back
hello prakash,
without commiting, the inserted row is not saved in the database,just it is stored in the memory.
here is the example.
SAVEPOINT S1;
UPDATE STMT..
create STMT.
SAVEPOINT S2;
INSERT
ROLLBACK TO S1;
For the above sequence first one savepoint is created s1. next update is done.next create stmt(ddl stmt)
another savepoint s2 is created.
after this insert the row.
1)when we r giving rollback to s1.
upto the savepoint s1 it will roll back.
creating the save point means,just we r giving conformation of transactions(dml stmts) which r done before savepoint.
2) another is we have done some set of transactions(dml stmts), after this if we give any ddl command(create alter drop)
our transactions before this ddl stmts are automatically get commited.
-
Junior Member
Re: Retrieve after roll back
if we have performed a DML operation either we have to use commit or we have to perform DDL operation else the changes can not be made in database.It appears to u that is there but others clients can not view this until there is a change made in database.As there is no change to data in database u r not able to retrieve it using rollback
Last edited by chaitueeturi; 01-23-2008 at 01:54 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules