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
1
vote
0 answers

Is Flink standalone cluster manual restart graceful wrt to job state/processing offset?

When we manually stop a standalone cluster(stop-cluster.sh) and then start it again(start-cluster.sh), we can see that all the jobs are restored after cluster is started. Does this use savepoints underhood to save and restore the jobs, or is it…
xrcsblue
  • 530
  • 1
  • 4
  • 11
1
vote
0 answers

Flink, How to create a Sink supported Savepoint?

I use Flink(1.9.2) and MongoDB. I want to customize a sink to output some messages into mongoDB for test. But after I finished and run it, My Job cannot take savepoint My Sink: public class MongoDBSink extends RichSinkFunction
wangyk
  • 53
  • 7
1
vote
1 answer

Postgresql - restore to savepoint across transaction boundaries

Is there a way to roll back to a "committed savepoint"? Afaik, the actual savepoints supported by postgresql are subtransactions and lose their meaning when the enclosing transaction commits or aborts. Are there "savepoints" across transaction…
User1291
  • 7,664
  • 8
  • 51
  • 108
1
vote
2 answers

ORA-01086: savepoint 'L_SAVEPOINT' never established in this session or is invalid

In my case, savepoint was set in Java and I am trying to rollback in a plsql procedure which was called in Java using a callable statement. There are no commits or rollbacks in between, but I am still seeing the error: ORA-01086: savepoint…
Mounika
  • 371
  • 4
  • 18
1
vote
1 answer

How do I use savepoints in SQL Workbench/J with Redshift?

Is it possible to recreate the following in redshift sql workbench? create table test as select top 10 * from core_data; savepoint sv; delete from test where name like 'A%'; savepoint sv2; delete from test where name like 'B%'; rollback to sv;
Biswankar Das
  • 303
  • 4
  • 12
1
vote
2 answers

How to compare two savepoints programmatically?

I want to compare two Savepoints and check if there were any commits to the database in between. For example, consider the following code snippet Savepoint save1 = connection.setSavePoint("before); // some processing happens here, which can commit…
mohitm
  • 153
  • 10
1
vote
2 answers

How do i set Savepoints for Linq to SQL and use "NO" ExecuteCommand?

TransactionScope TransactionABC = new TransactionScope(); try { context.Connection.Open(); { context.ExecuteCommand("insert into test (test) values (1)") context.SubmitChanges(); …
nik
  • 11
  • 2
1
vote
0 answers

Drupal on mysql cluster

when I put set the ENGINE=NDBCLUSTER of all the tables of the drupal and I edit and save the block in the drupal, there is problem about savepoint. The website encountered an unexpected error. Please try again later.1 array ( '%type' =>…
Jike
  • 11
  • 2
1
vote
2 answers

best practices to be followed to set a savepoint and rollback to it in test automation

I am a newbie to webservices and I was thinking of using savepoint mechanism in the test automation using webServices. Below is a code snippet Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/testDb", …
Sammy
  • 51
  • 1
  • 5
1
vote
1 answer

How to use Django 1.4 with Xeround?

According to Xeround's Release Notes they don't support save points and I can't figure out how to turn off support for this in Django 1.4. Does anyone know how to accomplish this?
mrbillyocean
  • 1,341
  • 1
  • 14
  • 24
0
votes
0 answers

Flink job restarted with "org.apache.flink.runtime.checkpoint.CheckpointFailureManager [] - Failed to trigger or complete checkpoint 1 for job"

During checkpointing, if the folder where snapshot is to be saved is already present. Like in my case "chk-1" is the folder where snapshot is to be saved is already present. I get below exception & post that job gets restarted. WARN …
0
votes
1 answer

How to stop a flink job at specified position

Say I have a flink job processing a data flow like 1, 2, control_flag, 3... When control_flag is met, the job should be stopped with savepoint and the following messages 3... should neither be processed or dropped. When centern actions are taken…
David
  • 67
  • 1
  • 6
0
votes
1 answer

SqlClient equivalent of "BEGIN TRY...END TRY"

We are trying to replicate the functionality of the following SQL, but using SqlClient code in c#. Consider the following SQL: BEGIN TRANSACTION -- lots of critical SQL that must be atomic …
David I. McIntosh
  • 2,038
  • 4
  • 23
  • 45
0
votes
1 answer

Is it possible to rollback only one command (not whole transaction) in SQL?

I know that you do the BEGIN; command, then all commands after that can be rolled back, as long as you haven't executed COMMIT; yet. My question is, is there a command to roll back just one command and not ALL commands after the BEGIN? I'm using…
0
votes
1 answer

Flink 1.14 : Why can't resotore savepoint got error Caused by: org.apache.flink.runtime.messages.FlinkJobNotFoundException: Could not find Flink job

I'm trying to restore a savepoint which is save to my local tmp folder.However i got below error when i trying to restore it.Do you have any idea about this ? /home/chinthakasajith/flink-1.14.0$ ./bin/flink run -m 127.0.0.1:28080 --detached…