on 12-12-2013 5:42 AM
Hello Experts,
I have a question regarding the COMMIT WORK statement when the underlying database is HANA.
My observation has been - when the underlying DB is MS-SQL, a statement like - INSERT dbtab FROM wa does not need a COMMIT WORK statement after the INSERT. The contents of wa are inserted into the dbtab immediately after the execution of the INSERT statement. On the other hand, this is not the case, when the underlying database is HANA. On an A4H (ABAP for HANA) system, the execution of INSERT dbtab FROM wa does NOT immediately insert the contents of wa to dbtab. Only when a COMMIT WORK statement is used after the INSERT, the insertion of the new record takes place.
Could you please help me understand why this is happening? Thanks for your time and effort.
Hi there,
could it be that on your MS SQL database you use a "READ UNCOMITTED" session/connection to check for the inserted data?
The standard behavior for all database platforms is: in sessions other than your own, show the data only after commit. That's the whole point of transactional isolation.
As far as I know, MS SQL is the only platform where we use "READ UNCOMMITTED" sessions, so I reckon this might be leading to the funny (and often problematic) effect that you can see data that has not yet been comitted to.
However, the session that executed the INSERT statement will always be able to see the new records right away.
- 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 |
---|---|
75 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.