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...

Types of locks in database ?

Answer Posted / shaheed ul haq sadi

1) Shared
A shared lock reserves its object for reading only. It
prevents the object from changing while the lock remains.
More than one program can place a shared lock on the same
object. More than one object can read the record while it is
locked in shared mode.

2) Exclusive
An exclusive lock reserves its object for the use of a
single program. This lock is used when the program intends
to change the object.

You cannot place an exclusive lock where any other kind
of lock exists. After you place an exclusive lock, you
cannot place another lock on the same object.

3) Promotable/Update

A promotable (or update) lock establishes the intent to
update. You can only place it where no other promotable or
exclusive lock exists. You can place promotable locks on
records that already have shared locks. When the program is
about to change the locked object, you can promote the
promotable lock to an exclusive lock, but only if no other
locks, including shared locks, are on the record at the time
the lock would change from promotable to exclusive. If a
shared lock was on the record when the promotable lock was
set, you must drop the shared lock before the promotable
lock can be promoted to an exclusive lock.

Is This Answer Correct ?    47 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between drop and truncate commands in sql?

1060


How do I install sql?

1002


When you have to use a default "rollback to" savepoint of plvlog?

1204


Is primary key a clustered index?

971


Explain the structure of pl/sql in brief.

1096


What is the current version of postgresql?

1070


How many sql statements are used?

1017


Is postgresql a nosql database?

1166


What is the difference between the sql*loader and import utilities? : aql loader

1047


What is a temp table?

1032


what is bcp? When is it used?

1118


What is the sql query to display the current date?

1048


How to avoid duplicate records in a query?

1012


What is sql lookup?

928


How to fetch values from testtable1 that are not in testtable2 without using not keyword?

1227