In SQL, what happens if you try to rollback to a savepoint from another user?

325 views Asked by At

If USER1 does some work, adds a savepoint SP1 but does not commit.

Then, USER2 does some other work, and tries to rollback to SP1.

Would there be an error? Thanks

1

There are 1 answers

0
AudioBubble On BEST ANSWER

Yes, there would be an error.

A savepoint is only visible and valid inside the transaction that created the savepoint.

So a transaction can only rollback to a savepoint that was created in that transaction.