Oracle Database Locks and How to check locks | Oracle Deadlocks

Sdílet
Vložit
  • čas přidán 25. 07. 2024
  • What is a database lock in the context of #SQL? ... When #data is locked, then that means that another #database session can NOT update that data until the lock is released (which unlocks the data and allows other database users to update that data. Locks are usually released by either a #ROLLBACK or #COMMIT SQL statement.
    00:00 Database ACID Properties
    04:05 Locks
    04:12 Scenario of starting locks examples-1
    20:51 Scenario of starting locks Examples-2
    29:58 Scenario of starting locks LAB
    46:16 Row level locks and Table level locks
    52:49 Identify Blockers and Waiters inside the database
    54:18 Find Locked Table Inside Oracle
    55:28 Find blocked session
    01:00:11 Find Lock wait time
    01:02:02 Find blocked SQL
    01:03:32 Find locked table
    01:12:14 Resolving locks in Oracle
    01:17:39 Database blocked Session Report
    01:18:32 Why locks are not bad inside the database?
    Website: www.dbagenesis.com/
    Facebook: / dbagenesis
    Instagram: / dbagenesis
    Twitter: / dbagenesis
  • Krátké a kreslené filmy

Komentáře • 27

  • @rakeeshmukkera7593
    @rakeeshmukkera7593 Před 3 lety +1

    Hi arun, I really enjoyed n understand with this LOCKS session. Thanks

  • @ganeshsonwane2637
    @ganeshsonwane2637 Před 2 lety +1

    this session was amazing.

  • @NicolaeCristian175
    @NicolaeCristian175 Před 3 lety +1

    great tutorial! thank you

  • @parasharampakhari1583
    @parasharampakhari1583 Před rokem +1

    Hii
    I really injoy this session and it's wonderful session to understand blocking and waiting session in Oracle database

  • @bhuvaneshwarisekar8390
    @bhuvaneshwarisekar8390 Před 10 měsíci

    Amazing explanation ❤️❤️such a helpful video😊

  • @prasadreddysunkari
    @prasadreddysunkari Před 5 lety +1

    Nice explanation sir

  • @Rasenganist
    @Rasenganist Před 3 lety +1

    Hello, thank you for the video, really nice talk and debug informations!
    My question is:
    - Does the ORA-00060 event an Oracle "tool" designed to autommaticcaly perform commit or rollback when a lock is detected?
    We experience currently some very rare deadlocks for "insert" statement wich trace files shows that Oracle does a rollback. Yet I have to re-check the logs to see which session is rolled-back.

    • @dbagenesis
      @dbagenesis  Před 3 lety

      Oracle will rollback your transactions post detection of deadlock.

  • @edim252525
    @edim252525 Před 3 lety +1

    Thanks for the video, Is there a way to generate a report for locks that occur in the past?

    • @dbagenesis
      @dbagenesis  Před 3 lety +1

      Locks are something you can check while they are occur right at the moment. Once they are released, its hard to track until you have a script in place that constantly captures locks and stores in a table.
      www.support.dbagenesis.com/post/lock-conflict-in-oracle

  • @rajkishore1960
    @rajkishore1960 Před 3 lety +1

    🤘😝🤘 super fantastic great 👏😊

  • @avijitsharma5050
    @avijitsharma5050 Před 3 lety

    Hi, i have been asked one question in interview.
    There is a table in production with huge records & someone issued some kind of command, that locked the table. I need to find out some way that data is available to users. Now since data is huge, copying data into new table is not a good approach.
    PS : i asked that lock will not create any issue while reading, since its write lock only. Interviewer said, assume its both read write lock.
    What should I be doing in this case ??

    • @dbagenesis
      @dbagenesis  Před 3 lety +1

      There is nothing called as read-write lock, the interviewer was checking your knowledge. Here are the lock types on Oracle:
      - Exclusive
      - Shared
      - Shared row exclusive
      - Row exclusive
      - Row shared

  • @mattareddyyarasani5040
    @mattareddyyarasani5040 Před 4 lety +1

    I have seen one of the wait event with SYS user for long time with '0' hash value.is it considerable?

  • @geofreybiddier8640
    @geofreybiddier8640 Před 2 lety

    I just watched the video and developed interest. Can somebody help me with the website address.

  • @ratanwaghmare341
    @ratanwaghmare341 Před 3 lety +1

    how to resolve enq-MS-contention,tx-row locck contention?

    • @dbagenesis
      @dbagenesis  Před 3 lety

      check this out: www.dba-oracle.com/t_enq_tx_row_lock_contention.htm#:~:text=Answer%3A%20The%20%22enq%3A%20TX,update%20the%20same%20data%20blocks.