Results 1 to 7 of 7

Thread: Dead lock & Lock

  1. #1
    Junior Member
    Join Date
    Feb 2009
    Answers
    11

    Dead lock & Lock

    What is the Difference between the dead lock and the normal locking errors?


  2. #2
    Expert Member
    Join Date
    Nov 2008
    Answers
    300

    Re: Dead lock & Lock

    Dead Lock - Say there are two process A and Process B.

    Process A is waiting for a Resource that is being Hold by process B and process B is waiting for a resource that is being Hold by Process A, this scenario is a Dead Lock which can be resolved by killing any one of the two processes

    Lock - Acquired while performing DML operations on tables. When an UPDATE, DELETE or INSERT is performed on a particular table , then the table should be locked by the USER who is performing DML operation so that during that particular transaction NO OTHER USER can perform any DML operation on the same table. If other user performs any DML operation then there will be data inconsistency. So allow one user to perform DML by locking the table for update, and when the transaction is completed and either commited or rolled back by the user, allow other user to use that particular table.


  3. #3
    Junior Member
    Join Date
    Mar 2009
    Answers
    2

    Re: Dead lock & Lock

    Could any one explain dead locks in terms of oracle rather than operating system.


  4. #4
    Contributing Member
    Join Date
    Dec 2008
    Answers
    76

    Re: Dead lock & Lock

    Hai plsqlromio,

    Check it out here...
    Deadlocks


  5. #5
    Junior Member
    Join Date
    Mar 2009
    Answers
    1

    Re: Dead lock & Lock

    Dead Lock:

    If we are having two process 1 and 2.If Process 1 is using for the resource which is currently using by process 2 and if process 2 is waiting for resource which is using by process 1 then we can call this scenario as deadlock.we need to kill one of the process.Oracle will automatically kills one process and frees the resource for other process.

    Lock:

    there are two kinds of locks in Oracle: 1.Exclusive lock and shared lock

    Exclusive lock:
    when any user perfoming DML operations on particular table,Oracle provides Exclusive lock for that particular user such that no other users can perform DML operations on that table.Such that we will have data consistency.

    Shared Lock:To maintain data concurrency we require Shared lock.


  6. #6
    Expert Member
    Join Date
    Nov 2008
    Answers
    300

    Re: Dead lock & Lock

    Simple. Procedure A and procedure B performing DML operations on table A and table B respectively. Now Procedure B is trying to perform DML on table A but it is not yet released by procedure A and similarly procedure A is trying to perform DML on table B but procedure B is still holding table B.

    I hope this helps!!


  7. #7
    Junior Member
    Join Date
    Mar 2009
    Answers
    28

    Wink Re: Dead lock & Lock

    Dead Lock: When to processors (p1,p2) accessing sing resource(r1) at same time fraction, that are generate an Dead lock error.(posibility of system hang)

    Lock: When you lock the schema(user) at administration. when trying to access the schema(user) to login to SQL. it trows an error called lock error


  8.  Sponsored Ads
    Ad


     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact