Questions tagged [transaction-isolation]

Transaction isolation relates to the visibility and impact of changes made in one transaction on concurrent transactions.

256 questions
5
votes
1 answer

Is Database Connection same as Session?

I'm bit confused about relationship between a Database Open Session Connection pooling To elaborate, I'm using JDBC with Oracle 9i DB and I'm also using a Connection Pool to pool my connections. What I would like to know is that: When my…
5
votes
2 answers

Does changing isolation level using TransactionScope in LINQ to SQL for NOLOCK impact the connection?

I'm testing out using TransactionScope with options to set the isolation level to ReadUncommitted to execute specific queries with as such. What I'm seeing, however, is that because the isolation level is set on the connection, when the connection…
5
votes
2 answers

Are postgresql transaction levels repeatable read and serializable the same?

Quote from http://www.postgresql.org/docs/9.4/static/transaction-iso.html : When you select the level Read Uncommitted you really get Read Committed, and phantom reads are not possible in the PostgreSQL implementation of Repeatable Read, so the…
Radek Postołowicz
  • 4,506
  • 2
  • 30
  • 47
5
votes
1 answer

How to set isolation level in @Transactional "READ_UNCOMMITTED". I am using EclipseLink 2.5.1-RC1

I have a requirement to start new Transaction within an ongoing Transaction so that an exception in 2nd transaction will rollback only new transaction not the old one. This I am doing by setting propagation attribute in 2nd transaction like…
5
votes
1 answer

After a Read Uncommitted query, do I have to set it back to Committed?

Imagine executing a query using code similar to this here: using (SqlConnection TheConnection = GetSqlConnectionNoCatch(SQLConnectionStr)) using (SqlDataAdapter TheDataAdapter = new SqlDataAdapter(SQLStatement, TheConnection) { MissingSchemaAction =…
JustLooking
  • 2,405
  • 4
  • 28
  • 38
5
votes
1 answer

serializable transaction isolation lock

I have set a serializable transaction isolation lock for a transaction.But i am observing some results which are not expected. My query is update tabl1 set col2 = 10 where col1 > 10 and col1 < 20 Here col1 is primary key.Here rows with col1 having…
wincoding
  • 65
  • 1
  • 10
4
votes
2 answers

Which isolation level to use in a basic MySQL project?

Well, I got an assignment [mini-project] in which one of the most important issues is the database consistency. The project is a web application, which allows multiple users to access and work with it. I can expect concurrent querying and updating…
fashasha
  • 481
  • 2
  • 7
  • 19
4
votes
1 answer

Strange behaviour from MYSQL 5 (Database Isolation)

I opened two command windows to work with my Database (MySQL5). Below is table structure I'm working with (It should be noted that I've turned off the auto commit by executing set autocommit=0;): Table Structure: CREATE TABLE `ajax`.`zipcodes` ( …
Vicky
  • 5,380
  • 18
  • 60
  • 83
4
votes
2 answers

Consistency for simultaneous UPDATES in Oracle, when the WHERE clause depends on the old value

I've been reading about Oracle data consistency guarantees, and supported transaction isolation levels, (e.g. here: https://docs.oracle.com/database/121/CNCPT/consist.htm#CNCPT121) and I feel like I'm getting a lot of high-level information, but I'm…
4
votes
1 answer

SQL SERVER 2008 R2 Transaction Snapshot Isolation Level Not Working As Expected

I created a database called 'test_isolation' and created a table 'person' with data name age ---- --- test1 1 test2 2 test3 3 test4 4 test5 5 test6 6 Now the database is altered to allow snapshot isolation in session1 ALTER…
3
votes
1 answer

Is it okay if from within one stored procedure I call another one that sets a lower transaction isolation level?

I have a bunch of utility procedures that just check for some conditions in the database and return a flag result. These procedures are run with READ UNCOMMITTED isolation level, equivalent to WITH NOLOCK. I also have more complex procedures that…
User
  • 30,403
  • 22
  • 79
  • 107
3
votes
3 answers

How to handle in an effective way duplicate key insertions w/out throwing an exception

My case scenario passes parameter to a procedure, that only does an insert. But two threads might try to pass the same value. How to handle this situation w/out throwing an exception and with least amount of locks? My performance requirement is at…
3
votes
1 answer

Is it possible to let Postgres automatically retry transactions?

I'm developing a Django application in which I want to have strong guarantees about the correctness of the data. For this reason, I have SERIALIZABLE as the transaction isolation level. However, during load testing I see some related error…
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
3
votes
1 answer

Race conditions between INSERT ON CONFLICT DO NOTHING and SELECT

Does a SELECT query following an INSERT … ON CONFLICT DO NOTHING statement always find a row, given the default transaction isolation (read committed)? I want to INSERT-or-SELECT a row in one table, then reference that when inserting rows in a…
Bergi
  • 630,263
  • 148
  • 957
  • 1,375
3
votes
4 answers

How should I go about implementing an "autonumber" field in SQL Server 2005?

I'm aware of IDENTITY fields but I have a feeling that I couldn't use one to solve my problem. Let's say I have multiple clients. Each client has multiple orders. Each client needs to have their orders numbered sequentially, specific to…
1 2
3
17 18