on 03-12-2013 8:25 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.