cancel
Showing results for 
Search instead for 
Did you mean: 

Does SAP HANA has SAVEPOINT support??

Former Member
0 Kudos

Hi,

   I have been working on an XS application and I have a scenario in which

I have to run an update query on a table followed by an alter query.

I want to keep the results only when both the queries run successfully.

If any query fails, rollback to the original state.

To achieve this, I think savepoint support is needed.

Please let me know how can it be done.

Thanks,

Praveen S

Accepted Solutions (1)

Accepted Solutions (1)

former_member184768
Active Contributor
0 Kudos

Hi Praveen,

I don't think there is a Transaction level SAVEPOINT options available as of today. As per the documentation here there are only COMMIT and ROLLBACK options.

The SAVEPOINT option is currently available at the database level as you can see here.

I think you can perform a commit before you transaction starts and then based on the query execution perform a ROLLBACK in case there is any exception or Query fails.

Regards,

Ravi

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

Hi Praveen,

SAVEPOINT in HANA refers to an event in the persistency layer (writing out changed data to the disk - something similar to e.g. the CHECKPOINT in Oracle DBMS).

What you seem to mean by SAVEPOINT is sub-transaction control, where you can rollback to a specific point in your open transaction.

This is currently not possible with HANA.

You either commit your transaction or you rollback.

- Lars