数据库锁的解析

Lock Mode:

https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms175519(v=sql.105)

Isolation Level:

https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms189122(v%3dsql.105)

Troubleshooter for replication

https://docs.microsoft.com/en-us/sql/relational-databases/replication/troubleshoot-tran-repl-errors?view=sql-server-2017

Dirty reads: read UNCOMMITED data from another transaction
Non-repeatable reads: read COMMITTED data from an UPDATE query from anouther transaction
Phantom reads: read COMMITTED data from an INSERT or DELETE query from another transaction

Benefits of different isolation levels READ_UNCOMMITTED prevents nothing. It’s the zero isolation level
READ_COMMITTED prevents just one, i.e. Dirty reads
REPEATABLE_READ prevents two anomalies: Dirty reads and Non-repeatable reads SERIALIZABLE prevents all three anomalies: Dirty reads, Non-repeatable reads and Phantom reads

In fact transaction time consumption is in the following rate:

SERIALIZABLE > REPEATABLE_READ > READ_COMMITTED > READ_UNCOMMITTED

So READ_UNCOMMITTED setting is the fastest. READ_COMMITTED is the default

发表评论

电子邮件地址不会被公开。 必填项已用*标注

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

您可以使用这些HTML标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>