Questions tagged [savepoints]

A **savepoint** is a way of implementing subtransactions (also known as nested transactions) within a relational database management system by indicating a point within a transaction that can be "rolled back to" without affecting any work done in the transaction before the savepoint was created.

A savepoint is a way of implementing subtransaction (also known as nested transaction) concept.

A savepoint is a point withing a transaction (withing a relational database management system) to which the transaction can be "rolled back" without affecting any work done before the savepoint was created.

A savepoint is a way to create a single subtransaction, or multiple subtransaction nested in one another, and it does not enable creating 2 paralell 'subtransaction', one of which would be rolled back and the second commited.

Savepoints on specific RDBMS

ORACLE and PostgreSQL SQL dialects have the same syntax for creating and rolling back to savepoint

SAVEPOINT savepointName;

creates a named savepoint

ROLLBACK TO savepointName;

invalidates all SQL queries done before creating savepoint and now.

When using ORACLE, note that any DDL operation issues implicit commit.

74 questions
0
votes
0 answers

How to know if I have started transaction control in MySQL already or not?

While running MySQL queries with the intention to be inside a transaction control, I often forget to issue the statement - START TRANSACTION; and keep on creating multiple SAVEPOINT only in the end when I try to return to a particular SAVEPOINT I…
Payel Senapati
  • 1,134
  • 1
  • 11
  • 27
0
votes
1 answer

Entity Framework and SQL Server Savepoints

I asked a different question about Nested Transactions and the answer to my question educated me enough to help me realize I was asking the question poorly. So here's a better question. How can I effectively implement SQL Server Savepoints (link 1,…
Jaxidian
  • 13,081
  • 8
  • 83
  • 125
0
votes
1 answer

Flink savepoint not saving the valuestates

I'm writing a Flink program and can't save my stateful variables while restarting a new job. I made a simple program with a connector from Kafka where I receive messages and a RichFlatMap with a valueState variable. This variable is an integer that…
0
votes
1 answer

Postgresql: rolling back to savepoint if it exists

Dealing with a DAL-type system, I've an issue with savepoint safety: a savepoint is created at the start of a process and either released on successful completion or rolled back on error. However while it's not normal it's possible that the entire…
Masklinn
  • 34,759
  • 3
  • 38
  • 57
0
votes
1 answer

How to rollback all the commits in Oracle DB

Recently I made a mistake, that, all the tables in my oracle database were dropped (running drop command from SQL Developer tool) in a sequence of all transactions unbeknownst to me that I was dropping tables at the wrong database. Each time I…
0
votes
0 answers

Oracle Apex SAVEPOINT

I've tried many different code lines for this but i can't figure out what the problem is. Every time i type "SAVEPOINT [savepoint-name];" in Oracle APEX i get an error "ORA-00911: invalid character" and i can't create the savepoint. Does anybody…
rodi
  • 13
  • 5
0
votes
1 answer

Is savepoint required inside FOR loop of PLSQL oracle?

just wondering if we really need rollback/savepoint required inside a LOOP statement if we have exception catch inside. create table my_Tab (id number, name varchar2(10), address varchar2(100)); insert into my_tab values (1,'ABC','XXX'); insert…
0
votes
0 answers

Savepoint in Oracle

I get a strange behaviour in my system. There is a process "proc_1". This process is fired on some group of people. When this group of people is under 5000-6000 everything works fine. But later it was fired on group in amount of 12000(took about 3…
q4za4
  • 630
  • 4
  • 12
0
votes
1 answer

Savepoints in triggers

I have 3 tables, let's say Table A, Table B and Table C. I have a trigger on Table A which inserts data into Table B, and I also have a trigger on Table b which inputs data into Table C. On Table C, there's a trigger that executes a procedure. The…
0
votes
1 answer

Can JDBC Savepoints be used in Restful Webservices?

There is a grid in my web application where data is obtained directly from a webservice using jQuery API. Requirement is to allow users to do some changes to their data undo if they want to finally commit their changes To implement this I used…
Muneeb Mirza
  • 810
  • 1
  • 17
  • 35
0
votes
1 answer

i got savepoint 'unrecogniszed statement type' error

it is showing error in savepoint when i type savepoint a; and the error is unrecognized statement type i am running code on phpmyadmin in wamp server This is my SQL: START TRANSACTION INSERT INTO class VALUES(5, 'Rahul'); COMMIT UPDATE class SET…
0
votes
1 answer

Savepoint in an Oracle PL/SQL LOOP to stop deadlocks or record locks contention

I have a simple procedure but I'm unsure on how to best implement a strategy to stop deadlocks or record locks. I'm updating a number of tables in an cursor LOOP while calling a procedure that also updates tables. There have been issues with…
0
votes
1 answer

Flink: How to persist and recover a ValueState

I use Flink to enrich a flow of inputs case class Input( key: String, message: String ) with precomputed scores case class Score( key: String, score: Int ) and produce an output case class Output( key: String, message: String, score: Int ) Both…
david
  • 309
  • 1
  • 4
  • 15
0
votes
1 answer

Duplicated messages reading via flink savepoints

I'm trying to use Apache Flink 1.6.0 to read some messages from a kafka topic, transform them and finally send them to another kafka topic. I use savepoints to save the state of the application in case of cancellation and restating. The problem is…
0
votes
0 answers

COMMIT , ROLLBACK db2 error

I got that message bellow : A savepoint cannot be set because a savepoint already exists and nested savepoints are not supported. I'm doing that query : P3: BEGIN ATOMIC INSERT INTO GPRSD001.COOP( -- CCOOP, …
Luiz
  • 141
  • 2
  • 14