GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL Plus
Go To First  |  Previous Question  |  Next Question 
 SQL Plus  |  Question 15 of 132    Print  
What is the usage of SAVEPOINTS

  
Total Answers and Comments: 3 Last Update: May 12, 2005   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Scott
 
By utilizing savepoints, you are able to rollback to a given point in your processing. An example of this would be: 
... 
COMMIT; 
 
INSERT 
UPDATE 
SAVEPOINT A 
 
DELETE 
UPDATE 
INSERT 
SAVEPOINT B 
 
INSERT 
INSERT 
DELETE 
SAVEPOINT C 
 
ROLLBACK TO SAVEPOINT B 
 
I only lost the two inserts and delete. Had I not placed savepoints in my processing and used a rollback, I would have lost my entire transaction back to the last good commit.

Above answer was rated as good by the following members:
premramana
March 14, 2005 06:18:14   #1  
Hiren Vachhani        

RE: What is the usage of SAVEPOINTS
SAVEPOINTS are used to subdivide a transaction into smaller parts. It enables rolling back part of a transaction. Maximum of five save points are allowed.
 
Is this answer useful? Yes | No
March 25, 2005 06:04:19   #2  
Ratan        

RE: What is the usage of SAVEPOINTS
Savepoints are the temporary bookmarks. it is possible to rollback up to the named savepoint.
 
Is this answer useful? Yes | No
May 12, 2005 10:22:05   #3  
Scott        

RE: What is the usage of SAVEPOINTS
By utilizing savepoints you are able to rollback to a given point in your processing. An example of this would be:
...
COMMIT;

INSERT
UPDATE
SAVEPOINT A

DELETE
UPDATE
INSERT
SAVEPOINT B

INSERT
INSERT
DELETE
SAVEPOINT C

ROLLBACK TO SAVEPOINT B

I only lost the two inserts and delete. Had I not placed savepoints in my processing and used a rollback I would have lost my entire transaction back to the last good commit.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape