ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
where do you use Isolations?give me some exmpale?
 Question Submitted By :: Hari
I also faced this Question!!     Rank Answer Posted By  
 
  Re: where do you use Isolations?give me some exmpale?
Answer
# 1
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
Arunyadav007
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
write query for fourth maximum salary from employee table Mind-Tree5
Why Do you want to work in this company? HCL3
What is Schema? and why we use schemas?  1
What is the difference between SSAS 2000 and SSAS 2005? APX1
write down the code for "how we delete a table without using of Drop command " ? Sonata2
What is the difference between Userdefined function and stored procedure? Explain and give the example also  4
What is normalization and its forms? Challenger-Financial3
what is the difference between Delete and Truncate Geo-Research-Centre3
What is a cursor in SQL Server 2000 and their types?  4
How to delete an attribute from the emp table  3
What are primary keys and foreign keys?  3
What is the difference between a Application Server and a Database Oracle2
Hello all, I have data like :- year amt 2004 10 2005 20 2006 30 Now i want output as:- 2004 2005 2006 10 30 60 but i have to use here group by on year.So, i need a single query within that i can find.  2
what is the Enterprise manager(2000) and management studio (2005)?  2
What is the difference between DTS and SSIS? Allianz3
can you any body tell me suppose database is suspect mode. how can take to normal? Teledata1
What about UPDATESTATISTICS ? Intelligroup2
what is diffence between replicaion and logshipping?  1
can any one please send sql quries most used in applications.  1
syntax for deleting the database in T SQL  4
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com