The transaction is about atomicity. The concept of atomicity means that some things can be viewed as an inseparable unit. From a database point of view, it refers to the smallest combination of one or more statements that should be executed all or
Errors in SQL SERVER triggersThere is an after insert trigger that triggers several times when the same transaction inserts more than one data. How many records are there in the inserted staging table?Myth: Within the same transaction, there must be
1. At the moment I just succeeded in experimenting with SQL 2008:To turn on the trace identity in the database:DBCC TRACEON (1204,-1)DBCC TRACEON (1222,-1)Both trace flags write deadlocks to the error log, but 1204 is in text format and 1222 is
The locks in SQL Server fall into two categories:
Shared locks
Exclusive lock
Lock compatibility: The interplay of locks between transactions is known as lock compatibility.
Lock Mode
is it possible to hold an
Concept IntroductionDevelopers like to use with (NOLOCK) in SQL scripts, with (NOLOCK) is actually one of the table hints (table_hint). It is equivalent to readuncommitted. The specific function functions are as follows (from MSDN):1: Specifies that
The definition of a thing:The object of the database is atomic, and the concept of atomicity refers to something as a unit.From a database point of view, it is the smallest combination of one or more statements that are executed or not executed at
Transaction
First, what is a businessCode control that ensures consistency of data, either committing commits or rolling back to the initial state of a transaction
Second, the four characteristics of business: ACIDA:
The transaction is all about atomicity. The concept of atomicity means that some things can be viewed as a unit. From a database perspective, it refers to the smallest combination of one or more statements that should be executed all or none of them.
TransactionFunction: Used to perform a series of actions, and to ensure that all actions are either executed or not executed.Properties: Atomic row, consistency, isolation, persistenceLockRole: SQL Server uses locks to enforce transaction isolation
Sessions 1 and Session 2 cannot continue until the other party frees resources. Therefore, SQL Server chooses a session in the deadlock as the "deadlock victim."
Note: The deadlock victim's session will be killed and the transaction will be rolled
Some time ago in the MSDN forum to see Sanda reply to a question, feel more understanding of the lock, first apart "take" record under study.
Original post address: Http://social.msdn.microsoft.com/Forums/zh-CN/6559504d-c546-45a6-89e2-eeb75041b3e7/-?
server| Data | database
Lock is a very important concept in network database, it is mainly used to guarantee database integrality and consistency under multi-user environment. The basic theory of lock used in various large databases is consistent,
An overviewIn the database aspect, for the non-DBA programmer, the transaction and the lock is a big difficulty, according to this difficulty, this article attempts to use the picture and text way to discuss with everybody."Talking about SQL Server
One: The concept of the lockAccording to the Writing technology blog, should be the concept of the lock to do an introduction, I think, can click into this blog students, presumably have heard of the lock. So I try to express it in concise
I. First, let's start with "Error" in SQL Server. The Error levels in SQL are 16, but the results are different. Select * from an external table if @ error0print this does not output goraiserror (,) if @ error0print this output goexec (select * from
Cause Analysis and Solution of slow SQL query speed, and cause analysis of slow SQL query speed
Cause Analysis and Solution for slow SQL query speed
There are many reasons for slow query speed. The following are common causes: 1. No index or no
There are many reasons for slow query speed. The following are common causes:1. No index or no index is used (this is the most common problem of slow query and is a defect in programming)2. Low I/O throughput, resulting in a bottleneck effect.3. the
Blog. btidea. comarticle. asp? There are many reasons for slow query speed of id440, which are common in the following ways: 1. No index or no index is used (this is the most common problem of slow query and is a defect in programming) 2. Low I/O
Analyze the 48 causes of slow SQL query.
Analyze the 48 causes of slow SQL query.
There are many reasons for slow query speed. The following are common causes:
1. No index or no index is used (this is the most common problem of slow query and is a
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.