Default transaction isolation level in Mysql,oracle,sql server view, change

Source: Internet
Author: User

READ UNCOMMITTED (the lowest level of isolation transaction, only guaranteed not to read physically corrupted data)

Read Committed (the default level of the database engine)

REPEATABLE READ

Serializable (the highest level of isolation transactions, complete isolation between transactions)

Can be serialized more rigorous, high level;

Mysql

MySQL default transaction level is ' Repeatable-read ', which is repeatable read

1. View the current session isolation level

SELECT @ @tx_isolation;

2. View the current isolation level of the system

SELECT @ @global. tx_isolation;

3. Set the current session isolation level

Set session transaction Isolatin level repeatable read;

4. Set the current isolation level of the system

Set global transaction ISOLATION level repeatable read;

Oracle

The Oracle database supports both transaction isolation levels of Read COMMITTED and serializable.

The default system transaction isolation level is read COMMITTED, which reads committed

1. View the system default transaction isolation level, which is also the current session isolation level

--Create a transaction first
Declare
trans_id Varchar2 (100);
Begin
trans_id: = dbms_transaction.local_transaction_id (TRUE);
End

--View Transaction ISOLATION LEVEL

SELECT S.sid, s.serial#,

Case Bitand (T.flag, POWER (2, 28))
When 0 Then ' READ COMMITTED '
ELSE ' SERIALIZABLE '
END as Isolation_level
From V$transaction t
JOIN v$session s on t.addr = s.taddr and S.sid = Sys_context (' USERENV ', ' Sid ');

SQL Server

The default system transaction isolation level is read Committed, which reads committed

1. View the current isolation level of the system

DBCC useroptions

Isolation level The value of this item is both the current isolation levels setting

2. Set the current isolation level of the system

SET TRANSACTION Isolation level Read uncommitted;

Where READ uncommitted is the value you want to set

Default transaction isolation level in Mysql,oracle,sql server view, change

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.