Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


where do you use Isolations?give me some exmpale?



where do you use Isolations?give me some exmpale?..

Answer / arunyadav007

Isolation Level controls the locking and row versioning
behavior of Transact-SQL statements issued by a connection
to SQL Server.

SET TRANSACTION ISOLATION LEVEL
{ READ UNCOMMITTED
| READ COMMITTED
| REPEATABLE READ
| SNAPSHOT
| SERIALIZABLE
}
READ UNCOMMITTED: Specifies that statements can read rows
that have been modified by other transactions but not yet
committed. This option has the same effect as setting
NOLOCK on all tables in all SELECT statements in a
transaction.

READ COMMITTED: Specifies that statements cannot read data
that has been modified but not committed by other
transactions. This prevents dirty reads. When the
READ_COMMITTED_SNAPSHOT database option is ON, you can use
the READCOMMITTEDLOCK table hint to request shared locking
instead of row versioning for individual statements in
transactions running at the READ_COMMITTED isolation level.

REPEATABLE READ: Specifies that statements cannot read data
that has been modified but not yet committed by other
transactions and that no other transactions can modify data
that has been read by the current transaction until the
current transaction completes.

SNAPSHOT: Specifies that data read by any statement in a
transaction will be the transactionally consistent version
of the data that existed at the start of the transaction.
The transaction can only recognize data modifications that
were committed before the start of the transaction. A
transaction running under SNAPSHOT isolation level can view
changes made by that transaction. For example, if the
transaction performs an UPDATE on a table and then issues a
SELECT statement against the same table, the modified data
will be included in the result set.

SERIALIZABLE: Specifies the following:

Statements cannot read data that has been modified but not
yet committed by other transactions.

No other transactions can modify data that has been read by
the current transaction until the current transaction
completes.

Other transactions cannot insert new rows with key values
that would fall in the range of keys read by any statements
in the current transaction until the current transaction
completes.

USE AdventureWorks;
GO
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
GO
BEGIN TRANSACTION;
GO
SELECT *
FROM HumanResources.EmployeePayHistory;
GO
SELECT *
FROM HumanResources.Department;
GO
COMMIT TRANSACTION;
GO

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is nonclustered index with included columns ?

0 Answers  


State the difference between union and union all?

0 Answers  


Explain important index characteristics?

0 Answers  


Explain table valued parameters in sql server? Why tvp used?

0 Answers  


what is a transaction and what are acid properties? : Sql server database administration

0 Answers  


Do you know what is normalization of database? What are its benefits?

0 Answers  


what is hash nonclustered index

0 Answers  


Tell me the difference between clustered and non-clustered index?

0 Answers  


How to test subquery results with the exists operator?

0 Answers  


When columns are added to existing tables, what do they initially contain?

0 Answers  


two tables are there.1st table EMP has two columns ID and name and contains data 1,A 2,B 3,C 2nd table EmpSal has 2 columns ID and Salary Contains data -1,1000 2,5000 3,3000 Find name of employee having maximum salary ?

5 Answers   CSE,


What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?

11 Answers   World Tech, Yardi Software,


Categories