CoolInterview.com - World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.




Get it now !!
Send your Resume to 6000 Companies

Search Interview Questions

Question: What is a transaction isolation level and What is the advantage of it? What are different options that we set for a transaction isolation level? Transaction isolation levels are used when we go for transactions in stored procedures used in Transact SQL.

Answer: Transaction Lavel isolation:- The isolation level used during the execution of SQL statements determines the degree to which the activation group is isolated from concurrently executing activation groups.

Thus, when activation group P executes an SQL statement, the isolation level determines:

* The degree to which rows retrieved by P and database changes made by P are available to other concurrently executing activation groups.
* The degree to which database changes made by concurrently executing activation groups can affect P.

There are many advantages to this approach: read-intensive applications typically want more index structures, data redundancies, and even other views of data. Transaction processing systems want the best write throughput while incurring only the most minimal overhead. The access patterns of readers and writers typically differ: Readers are more prone to larger analysis types of queries, and writers are more prone to singleton inserts, updates, and deletes. When these activities are separated, the administrator can focus on recovery strategies for a smaller, more manageable transaction processing system. OLTP databases tend to be much smaller than data redundant decision-support or analysis-oriented databases.

There are four isolation levels:

1. READ UNCOMMITTED
2. READ COMMITTED
3. REPEATABLE READ
4. SERIALIZABLE

1. Read uncommitted
When it's used, SQL Server not issue shared locks while reading data. So, you can read an uncommitted transaction that might get rolled back later. This isolation level is also called dirty read. This is the lowest isolation level. It ensures only that a physically corrupt data will not be read.

2.Read committed
This is the default isolation level in SQL Server. When it's used, SQL Server will use shared locks while reading data. It ensures that a physically corrupt data will not be read and will never read data that another application has changed and not yet committed, but it does not ensure that the data will not be changed before the end of the transaction.

3.Repeatable read
When it's used, the dirty reads and nonrepeatable reads cannot occur. It means that locks will be placed on all data that is used in a query, and another transactions cannot update the data.

4.Serializable
Most restrictive isolation level. When it's used, then phantom values cannot occur. It prevents other users from updating or inserting rows into the data set until the transaction is complete.



Category SQL Server Interview Questions & Answers - Exam Mode / Learning Mode
Rating (4.1) By 8 users
Added on 4/3/2013
Views 463
Rate it!
Question: What is a transaction isolation level and What is the advantage of it? What are different options that we set for a transaction isolation level? Transaction isolation levels are used when we go for transactions in stored procedures used in Transact SQL.
Answer:

Transaction Lavel isolation:- The isolation level used during the execution of SQL statements determines the degree to which the activation group is isolated from concurrently executing activation groups.

Thus, when activation group P executes an SQL statement, the isolation level determines:

* The degree to which rows retrieved by P and database changes made by P are available to other concurrently executing activation groups.
* The degree to which database changes made by concurrently executing activation groups can affect P.

There are many advantages to this approach: read-intensive applications typically want more index structures, data redundancies, and even other views of data. Transaction processing systems want the best write throughput while incurring only the most minimal overhead. The access patterns of readers and writers typically differ: Readers are more prone to larger analysis types of queries, and writers are more prone to singleton inserts, updates, and deletes. When these activities are separated, the administrator can focus on recovery strategies for a smaller, more manageable transaction processing system. OLTP databases tend to be much smaller than data redundant decision-support or analysis-oriented databases.

There are four isolation levels:

1. READ UNCOMMITTED
2. READ COMMITTED
3. REPEATABLE READ
4. SERIALIZABLE

1. Read uncommitted
When it's used, SQL Server not issue shared locks while reading data. So, you can read an uncommitted transaction that might get rolled back later. This isolation level is also called dirty read. This is the lowest isolation level. It ensures only that a physically corrupt data will not be read.

2.Read committed
This is the default isolation level in SQL Server. When it's used, SQL Server will use shared locks while reading data. It ensures that a physically corrupt data will not be read and will never read data that another application has changed and not yet committed, but it does not ensure that the data will not be changed before the end of the transaction.

3.Repeatable read
When it's used, the dirty reads and nonrepeatable reads cannot occur. It means that locks will be placed on all data that is used in a query, and another transactions cannot update the data.

4.Serializable
Most restrictive isolation level. When it's used, then phantom values cannot occur. It prevents other users from updating or inserting rows into the data set until the transaction is complete. Source: CoolInterview.com



If you have the better answer, then send it to us. We will display your answer after the approval

Rules to Post Answers in CoolInterview.com:-

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.

Post your answer here

Inform me about updated answers to this question.
Related Questions
View Answer
What is the difference between the full, simple and bulk log recovery models?
View Answer
What does the Log Reader agent in SQL Server 2005 replication do?
View Answer
What does this return?
select (1324 & 1024)
View Answer
Where does Profiler store its temporary data in SQL Server 2005?
View Answer
What does this return?
declare @i int
select @i = -5
select +@i
View Answer
Which of the following modules within SQL Server 2005 cannot be signed with a digital signature?
View Answer
What are the three possible functions of the plus (+) operator in SQL Server 2005, the base installed T-SQL?
View Answer
What does the Queue Reader Agent do in SQL Server 2005 replication?
View Answer
How does a differential backup know which extents have changed so that it can be very quickly run?
View Answer
When you create a new Message Type in the SQL Server 2005 Service Broker, what does the Authorization parameter signify?
View Answer
What is the recommended way to send mail from SQLAgent in SQL Server 2005?
View Answer
How do I submit a form or a part of a form without a page refresh?
View Answer
In which order do you perform an upgrade to SQL Server 2005 for replicated databases?
View Answer
Error severity 13 indicates what?
View Answer
What is SQL Server ?
View Answer

Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.

View All SQL Server Interview Questions & Answers - Exam Mode / Learning Mode




India News Network
Latest 20 Questions
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
"Holiday Packages" announced as an advertisement are an example of _________: (a) Offer (b) Counter Offer (c) Invitation to Offer (d) None of the above
A match fixing contract between a player and a broker is a: (a) Valid Contract (b) Unenforceable Contract (c) Void Contract (d) Illegal Contract
When a bookseller sells a book on cash payment then it is called as ___________: (a) Unilateral Contract (b) Bilateral Contract (c) Executed Contract (d) Executory Contract
____________ agreements are created by situation: (a) Written (b) Oral (c) Void (d) Implied
Cache = 0.03125 Seconds