SlideShare une entreprise Scribd logo
1  sur  46
Télécharger pour lire hors ligne
Oracle Database Locking
Mechanism Demystified
Pini Dibask, Product Manager for Database Solutions
November 17th 2016
Confidential2
• Pini Dibask, Product Manager, Database Solutions (Quest)
• Oracle DBA since 2006
• Oracle Certified Professional DBA (OCP)
• My Blog: OracleDBPro.BlogSpot.com
Pini.Dibask@Quest.com
http://Linkedin.com/in/pinidibask
@pini_dibask
About Me
Confidential3
About
• Quest is now an independent company again!
• Simplifies IT management
• #1 independent software company for Database Tools
• Driven by innovation
“Spend less time on what you need to do, and more time on what you want to do!”
• Committed to providing great products and superior support
Confidential4
• Overview of Locks in Database Management Systems
• Oracle Database Locking Mechanism Concepts
• Advanced Locking Scenarios
• Monitoring Locks using Dictionary Views and Tools
Agenda
Confidential5
Overview of Locks in
Database Management Systems
Confidential6
• Why locks? Because Databases need to support multiple user applications
• Used to ensure Database Consistency and Integrity
• Affect the interaction of readers and writers
• Every DBMS has its own implementation of locking mechanism
Overview of Database Locks
Confidential7
Oracle Database
Locking Mechanism Concepts
Confidential8
• Reader never blocks reader
• Reader never blocks writer
(except: SELECT .. FOR UPDATE)
• Writer never blocks reader
(except rare scenario of distributed transaction)
• Writer might block writer
(depends on the operation)
High Level Overview
Reader Writer
Reader No Block No Block
Writer No Block Block
Confidential9
• Oracle blocks can be modified during execution of DMLs
• Undo Tablespace holds “before” image of Database Blocks
• During SELECT query Oracle reads undo images if needed
• This provides 2 important features:
• Non-Blocking Queries
• Read Consistency
Writer Never Blocks Reader - How?
“Before” Image
placed in Undo
Tablespace
Session
updates a
record
Oracle
reconstructs
the block using
undo image
Undo
Tablespace
Confidential10
• 2 Lock Modes in general:
• Share Lock – Many can be acquired on a resource
• Exclusive Lock – Only one can be acquired on a resource
• Example - User updates a row in table EMPLOYEES
• Row will be locked in exclusive mode
• Table will be locked in share mode
Lock Modes
Confidential11
• When? During DML statements:
Insert, update, delete, merge, select … for update
• DML operations acquire 2 lock types:
• Row Locks (AKA “TX Lock”)
• Table Locks (AKA “TM Lock”)
DML Locks
Confidential12
• Oracle uses row-level locking during DML operations
• Modified rows will be locked in exclusive lock mode
• Oracle stores lock information in the containing data block header
• No overhead with Oracle row-level locking mechanism
DML Row Locks (“TX Locks”)
Confidential13
Session #2
SQL> UPDATE employees SET name = 'Mark' WHERE id = 1;
1 row updated.
Session #1
SQL> CREATE TABLE employees (id NUMBER, name VARCHAR2 (20));
Table created.
SQL> INSERT INTO employees VALUES (1, 'David');
1 row created.
SQL> INSERT INTO employees VALUES (2, 'Jason');
1 row created.
SQL> commit;
Commit complete.
DML Row Locks (“TX Locks”) - Demo
SQL> UPDATE employees SET name = 'Peter' WHERE id = 2;
1 row updated.
Row already
locked by
session #1
SQL> UPDATE employees SET name = 'John' WHERE id = 2;
(waiting – session is blocked)
Confidential14
• Oracle automatically locks tables (share mode) involved in DML operations
• Prevent DDL operations which may conflict with running transactions
Table Locks (“TM Locks”) Cont’d
EMPLOYEE_ID LAST_NAME EMAIL HIRE_DATE JOB_ID MANAGER_ID DEPARTMENT_ID
100 King SKING 17-JUN-87 AD_PRES 90
101 Kochhar NKOCHHAR 21-SEP-89 AD_VP 100 90
102 De Hann LDEHANN 13-JAN-93 AD_VP 100 90
103 Hunold AHUNOLD 03-JAN-90 IT_PROG 102 60
Table EMPLOYEES
Table lock acquired Exclusive row lock (TX) acquired Row being updated
Confidential15
• There are 6 lock modes (LMODE and REQUEST columns in V$LOCK)
• [0, 1] – No lock
• 2 – (RS) Row Share
• 3 – (RX) Row Exclusive (DML Operations)
• 4 – (S) Share
• 5 – (SSX) Share Row Exclusive
• 6 – (X) Exclusive (DDL operations)
Table Locks (“TM Locks”)
2 3 4 5 6
2 Block
3 Block Block Block
4 Block Block Block
5 Block Block Block Block
6 Block Block Block Block Block
TM Blocking Matrix
Confidential16
DML Locks - Demo
SQL> UPDATE employee
2 SET last_name = 'Jones'
3 WHERE employee_id = 139;
1 row updated.
SQL> SELECT type, lmode
FROM v$lock
WHERE sid = 383;
TYPE LMODE
----- ----------
TX 6
TM 3
(Session ID #383)
Row of
employee_id #139
is locked in
LMODE 6 -
Exclusive (x)
Table EMPLOYEE
is locked in
LMODE 3 - Row
Exclusive Table
Lock (RX)
SQL> SELECT object_name,
session_id,
oracle_username,
locked_mode
FROM v$locked_object JOIN dba_objects USING (object_id);
OBJECT_NAME SESSION_ID ORACLE_USERNAME LOCKED_MODE
---------------- ------------- ----------------------- -----------------
EMPLOYEE 383 SALES 3
Confidential17
• Protect definition of schema objects during DDL statements
• Exclusive Locks (LMODE = 6)
• Most DDL Operations (e.g. ALTER TABLE, DROP TABLE)
• Other sessions cannot execute DML or DDL on the object
• Share Locks
• Allow data concurrency for similar operations
• Only modified objects are locked - Oracle never locks entire Data Dictionary
DDL Locks
Confidential18
• Problem
• DDL commands (e.g. ALTER TABLE, DROP TABLE) require exclusive locks (LMODE = 6)
• It’s hard to acquire exclusive lock on frequently accessed object
• Solution
• DDL_LOCK_TIMEOUT parameter (available from Oracle 11g)
• Specifies time limit for how long DDL statements will wait in DML lock queue
• Default value is 0
• Can be set at session level (ALTER SESSION) or instance level (ALTER SYSTEM)
DDL Locks Cont’d
Confidential19
Session #1
SQL> UPDATE employee
SET last_name = 'Jones'
WHERE employee_id = 139;
1 row updated.
DDL Locks - Demo
SQL> alter system set ddl_lock_timeout=10;
System altered.
SQL> drop table employee;
drop table employee
*
ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT
specified or timeout expired
Session #2
SQL> drop table employee;
drop table employee
*
ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT
specified or timeout expired
Table already
locked in
share mode
Available
from version
11g
Oracle waits
10 seconds
before raising
this error
Confidential20
• Oracle automatically manages locks
• Locks will be released once transaction is over
• Lowest lock level will be used for maximum concurrency
• Oracle Database never escalates locks
• Ordering of locks is based on FIFO (First-In-First-Out)
How Oracle Manages Locks?
Confidential21
FIFO Lock Ordering - Demo
Session #1
SQL> SELECT * FROM employees;
EMP_ID NAME DEPT_ID
---------- ------------ ----------
1 David 3
2 John 4
SQL> UPDATE employees
SET name = 'Greg'
WHERE emp_id = 1;
1 row updated.
Session #2
SQL> LOCK TABLE employees
IN EXCLUSIVE MODE;
(waiting – session is blocked)
Session #3
SQL> UPDATE employees
SET name = 'Daniel'
WHERE emp_id = 2;
(waiting – session is blocked)
Confidential22
• It is possible to override Oracle’s default locking mechanisms
• Should be avoided unless there is a justified application requirement
Example: Transaction needs exclusive access to resource and must not wait for other transactions
• Manual row-level locks: SELECT … FOR UPDATE statement
• Manual table-level locks: LOCK TABLE statement
Manual Data Locks
Confidential23
Manual Row Locks - Demo
Session #1
SQL> SELECT id, name
FROM employees
WHERE id = 2 FOR UPDATE;
ID NAME
------------------------------
2 Jason
Session #2
SQL> UPDATE employees SET name = 'Mark' WHERE id = 1;
1 row updated.
SQL> UPDATE employees SET name = 'John' WHERE id = 2;
(waiting – session is blocked)
Confidential24
Manual Table Locks - Demo
• LOCK TABLE IN [ ROW SHARE | ROW EXCLUSIVE | SHARE | SHARE ROW EXCLUSIVE | EXCLUSIVE ] MODE
Session #1 (SID 385)
SQL> SELECT * FROM employees FOR UPDATE;
ID NAME
------------------------------
2 Jason
Session #2 (SID 195)
SQL> LOCK TABLE employees IN ROW SHARE MODE;
Table(s) Locked.
SQL> LOCK TABLE employees IN EXCLUSIVE MODE;
(waiting - session is blocked)
SQL> SELECT sid, lmode acquired, request, blocking_session, SQL_TEXT
FROM v$lock l JOIN v$session s USING (sid) LEFT JOIN v$sqlarea USING (sql_id)
WHERE block = 1 OR request > 0 ;
SID ACQUIRED REQUEST BLOCKING_SESSION SQL_TEXT
---------- --------------- ---------- ---------------------- ------------------------------------------------
385 3 0
195 2 6 385 LOCK TABLE employees in exclusive mode
Confidential25
Advanced Locking Scenarios
Confidential26
• 2 sessions, each one locking resource that other session wants
• At this stage both could become blocked forever
• Oracle automatically detects deadlock scenarios
• One of 2 sessions will be “Deadlock Victim”
• Oracle performs statement-level rollback
Deadlocks
Session 1 Session 2
Resource 1 Resource 2
Is holdingIs holding Wants
Confidential27
SQL> UPDATE employee
SET first_name = 'Mark'
WHERE employee_id = 39;
(Waiting - session is blocked)
Deadlocks - Demo
Session #1
SQL> UPDATE employee
SET first_name = 'David'
WHERE employee_id = 151;
1 row updated.
SQL> UPDATE employee
SET first_name = 'John'
WHERE employee_id = 151;
(Waiting - session is blocked)
Session #2
SQL> UPDATE employee
SET first_name = 'Greg'
WHERE employee_id = 39;
1 row updated.
Row already
locked by
session #2
ORA-00060: deadlock detected while waiting for resource
Row already
locked by
session #1
Statement
has been
rolled-back
Confidential28
• Deadlock error (ORA-00060) is also audited in Alert Log
Deadlocks Cont’d
orcl11_ora_3600.trc
Confidential29
Deadlocks Cont’d
orcl11_ora_3600.trc (cont’d)
Session 584
(sid 584) is
still waiting
with this
statement
The statement
that has been
rolled-back
(“This session”)
Confidential30
• Most common scenario of blocked inserts:
• 2 sessions insert same value for column that has unique or primary key
• Another scenario that involves tables with foreign keys
• Row inserted/deleted on the parent table
• Row inserted to the child table - may be blocked
Blocked Inserts
Confidential31
Session #2
SQL> insert into employees values (1, 'David');
(waiting – row already locked by session #1)
Blocked Inserts - Demo
Session #1
SQL> CREATE TABLE employees
(
id NUMBER,
name VARCHAR2 (20),
CONSTRAINT pk_id PRIMARY KEY (id)
);
Table created.
SQL> insert into employees values (1, 'John');
1 row created.
*
ERROR at line 1:
ORA-00001:
unique constraint (SALES.PK_ID) violated
SQL> commit;
Commit complete.
Confidential32
Session #2
SQL> insert into employees values (1, 'David');
(waiting – row already locked by session #1)
Blocked Inserts - Demo Cont’d
Session #1
SQL> CREATE TABLE employees
(
id NUMBER,
name VARCHAR2 (20),
CONSTRAINT pk_id PRIMARY KEY (id)
);
Table created.
SQL> insert into employees values (1, 'John');
1 row created.
SQL> rollback;
Rollback complete.
1 row created.
Confidential33
• Oracle Database places full table lock (LMODE = 4) on child table when:
• Unindexed foreign key column on child table
• Session updates parent table’s primary key
• Session deletes row from parent table
• Increases probability for deadlocks
• Best practice - foreign key columns should be indexed
• Exception - Matching primary key or unique key never updated or deleted
Unindexed Foreign Keys
Confidential34
Unindexed Foreign Keys Cont’d
DEPARTMENT__ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID
60 IT 103 1400
90 Executive 100 1700
Parent Key Primary key of referenced table
Unindexed Foreign Key
EMPLOYEE__ID LAST_NAME EMAIL HIRE_DATE JOB_ID MANAGER_ID DEPAETMENT_ID
100 IT SKING 17-JUN-87 AD_PRES 90
101 Executive NKOCHHAR 21-SEP-89 AD_VP 100 90
102 De Hann LDEHANN 13-JAN-93 AD_VP 100 90
103 Hunold AHUNOLD 03-JAN-90 IT_PROG 102 60
Full table lock acquired Exclusive row lock (TX) acquired Primary key modified
Table EMPLOYEES (Dependent Child Table)
Table DEPARTMENTS (Referenced or Parent Table)
EMPLOYEES
table is
locked
Session updates
value of primary
key
Confidential35
Indexed Foreign Keys
Full table lock acquired Exclusive row lock (TX) acquired Row being deleted
DEPARTMENT__ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID
60 IT 103 1400
90 Executive 100 1700
280 Event Planning 1700
Parent Key Primary key of referenced table
Table DEPARTMENTS (Referenced or Parent Table)
Indexed Foreign Key
EMPLOYEE__ID LAST_NAME EMAIL HIRE_DATE JOB_ID MANAGER_ID DEPAETMENT_ID
100 King SKING 17-JUN-87 AD_PRES 90
101 Kochhar NKOCHHAR 21-SEP-89 AD_VP 100 90
102 De Hann LDEHANN 13-JAN-93 AD_VP 100 90
103 Hunold AHUNOLD 03-JAN-90 IT_PROG 102 60
Table EMPLOYEES (Dependent Child Table)
Session
deletes
a row
DMLs are
allowed on
EMPLOYEES
Confidential36
Monitoring
Confidential37
• V$SESSION - Lists session information for each current session
• V$LOCK/DBA_LOCK - Lists all locks currently held and all requests for a lock
• V$LOCKED_OBJECT - Lists sessions holding locks on what objects and in what mode
• DBA_BLOCKERS - Lists sessions holding a lock that blocks another session
• DBA_WAITERS - Lists sessions that are waiting for a lock
Monitoring locks via Oracle Dictionary Views
Confidential38
Monitoring locks via Oracle Dictionary Views Cont’d
SQL> SELECT DECODE (blocking_session, null, null, 'BLOCKED') status,
sid,
lmode,
request,
ctime duration,
USER,
program,
blocking_session,
DECODE (request, 0, NULL, SQL_TEXT) SQL_TEXT
FROM v$lock l
JOIN v$session s USING (sid)
LEFT JOIN v$sqlarea USING (sql_id)
WHERE block = 1 OR request > 0
ORDER BY status
STATUS SID LMODE REQUEST DURATION USER PROGRAM BLOCKING_SESSION SQL_TEXT
----------- ---------- ---------- ---------- ---------- ------- ----------- ---------------------------- ------------------------------------------------
BLOCKED 195 4 5 16581 SALES sqlplus.exe 385 lock table employees in share row exclusive mode
BLOCKED 13 0 3 10129 SALES Toad.exe 385 insert into employees values (1, 'Jason')
385 4 0 16575 SALES sqlplus.exe
Real-Time
Monitoring
Confidential39
Monitoring Blocked Sessions via Tools
Confidential40
Monitoring Blocked Sessions via Tools
Confidential41
Monitoring Blocked Sessions via Tools
Confidential42
Monitoring Blocked Sessions via Tools
Confidential43
Monitoring Blocked Sessions via Tools
Confidential44
Monitoring Blocked Sessions via Tools
Confidential45
• Is lock a bad thing? No! Locks are essential!
• Hold locks as long as you need, but not more than you need
• Avoid Manual Locking unless it is justified
• Foreign keys in most cases should be indexed
• Proactively monitor your Database to identify blocked sessions
• Modify application code if needed
Summary
Confidential46
Q&A

Contenu connexe

Tendances

Same plan different performance
Same plan different performanceSame plan different performance
Same plan different performanceMauro Pagano
 
C11,12 SQL Server 2012 Performance Tuning by Yukio Kumazawa
C11,12 SQL Server 2012 Performance Tuning by Yukio KumazawaC11,12 SQL Server 2012 Performance Tuning by Yukio Kumazawa
C11,12 SQL Server 2012 Performance Tuning by Yukio KumazawaInsight Technology, Inc.
 
MySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptxMySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptxNeoClova
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsCarlos Sierra
 
오라클 DB 아키텍처와 튜닝
오라클 DB 아키텍처와 튜닝오라클 DB 아키텍처와 튜닝
오라클 DB 아키텍처와 튜닝철민 권
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsEnkitec
 
MariaDB 마이그레이션 - 네오클로바
MariaDB 마이그레이션 - 네오클로바MariaDB 마이그레이션 - 네오클로바
MariaDB 마이그레이션 - 네오클로바NeoClova
 
Oracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLONOracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLONMarkus Michalewicz
 
Migration to Oracle Multitenant
Migration to Oracle MultitenantMigration to Oracle Multitenant
Migration to Oracle MultitenantJitendra Singh
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuningSimon Huang
 
SQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tangoSQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tangoMauro Pagano
 
Winning Performance Challenges in Oracle Multitenant
Winning Performance Challenges in Oracle MultitenantWinning Performance Challenges in Oracle Multitenant
Winning Performance Challenges in Oracle MultitenantPini Dibask
 
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQLTop 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQLJim Mlodgenski
 
Transaction Management on Cassandra
Transaction Management on CassandraTransaction Management on Cassandra
Transaction Management on CassandraScalar, Inc.
 
PostGreSQL Performance Tuning
PostGreSQL Performance TuningPostGreSQL Performance Tuning
PostGreSQL Performance TuningMaven Logix
 
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACThe Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACMarkus Michalewicz
 
Parallel Execution With Oracle Database 12c - Masterclass
Parallel Execution With Oracle Database 12c - MasterclassParallel Execution With Oracle Database 12c - Masterclass
Parallel Execution With Oracle Database 12c - MasterclassIvica Arsov
 
PostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / ShardingPostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / ShardingAmir Reza Hashemi
 
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte DataProblems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte DataJignesh Shah
 

Tendances (20)

Same plan different performance
Same plan different performanceSame plan different performance
Same plan different performance
 
C11,12 SQL Server 2012 Performance Tuning by Yukio Kumazawa
C11,12 SQL Server 2012 Performance Tuning by Yukio KumazawaC11,12 SQL Server 2012 Performance Tuning by Yukio Kumazawa
C11,12 SQL Server 2012 Performance Tuning by Yukio Kumazawa
 
MySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptxMySQL_MariaDB로의_전환_기술요소-202212.pptx
MySQL_MariaDB로의_전환_기술요소-202212.pptx
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
오라클 DB 아키텍처와 튜닝
오라클 DB 아키텍처와 튜닝오라클 DB 아키텍처와 튜닝
오라클 DB 아키텍처와 튜닝
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
MariaDB 마이그레이션 - 네오클로바
MariaDB 마이그레이션 - 네오클로바MariaDB 마이그레이션 - 네오클로바
MariaDB 마이그레이션 - 네오클로바
 
Oracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLONOracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLON
 
Migration to Oracle Multitenant
Migration to Oracle MultitenantMigration to Oracle Multitenant
Migration to Oracle Multitenant
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
 
SQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tangoSQL Tuning, takes 3 to tango
SQL Tuning, takes 3 to tango
 
Winning Performance Challenges in Oracle Multitenant
Winning Performance Challenges in Oracle MultitenantWinning Performance Challenges in Oracle Multitenant
Winning Performance Challenges in Oracle Multitenant
 
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQLTop 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
 
Transaction Management on Cassandra
Transaction Management on CassandraTransaction Management on Cassandra
Transaction Management on Cassandra
 
PostGreSQL Performance Tuning
PostGreSQL Performance TuningPostGreSQL Performance Tuning
PostGreSQL Performance Tuning
 
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RACThe Top 5 Reasons to Deploy Your Applications on Oracle RAC
The Top 5 Reasons to Deploy Your Applications on Oracle RAC
 
Parallel Execution With Oracle Database 12c - Masterclass
Parallel Execution With Oracle Database 12c - MasterclassParallel Execution With Oracle Database 12c - Masterclass
Parallel Execution With Oracle Database 12c - Masterclass
 
PostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / ShardingPostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / Sharding
 
SQL
SQLSQL
SQL
 
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte DataProblems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
 

En vedette

En vedette (13)

Final Copy K Newsletter
Final Copy K NewsletterFinal Copy K Newsletter
Final Copy K Newsletter
 
Filosofia 1. ebaluazioa
Filosofia 1. ebaluazioaFilosofia 1. ebaluazioa
Filosofia 1. ebaluazioa
 
Ulei Castrol-Preturi speciale!
Ulei Castrol-Preturi speciale!Ulei Castrol-Preturi speciale!
Ulei Castrol-Preturi speciale!
 
Holistic Approach To Saving Energy Dr Shriiwas Kashalikar
Holistic  Approach To  Saving  Energy  Dr  Shriiwas  KashalikarHolistic  Approach To  Saving  Energy  Dr  Shriiwas  Kashalikar
Holistic Approach To Saving Energy Dr Shriiwas Kashalikar
 
المبيدات و الأطفال
المبيدات و الأطفالالمبيدات و الأطفال
المبيدات و الأطفال
 
Angoulême avril 2016
Angoulême avril 2016Angoulême avril 2016
Angoulême avril 2016
 
Slides sobre o romantismo poesia
Slides sobre o romantismo poesiaSlides sobre o romantismo poesia
Slides sobre o romantismo poesia
 
Définissez votre stratégie sur les médias sociaux
Définissez votre stratégie sur les médias sociauxDéfinissez votre stratégie sur les médias sociaux
Définissez votre stratégie sur les médias sociaux
 
Romantismo
RomantismoRomantismo
Romantismo
 
Ecoregions
EcoregionsEcoregions
Ecoregions
 
Indirect speech
Indirect speechIndirect speech
Indirect speech
 
Resume
ResumeResume
Resume
 
Same Day ACH: The Face of Faster Payment
Same Day ACH: The Face of Faster PaymentSame Day ACH: The Face of Faster Payment
Same Day ACH: The Face of Faster Payment
 

Similaire à DOAG - Oracle Database Locking Mechanism Demystified

Oracle database locking mechanism demystified (AOUG)
Oracle database locking mechanism demystified (AOUG)Oracle database locking mechanism demystified (AOUG)
Oracle database locking mechanism demystified (AOUG)Pini Dibask
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Less08 managing data and concurrency
Less08 managing data and concurrencyLess08 managing data and concurrency
Less08 managing data and concurrencyImran Ali
 
Scaling MySQL Strategies for Developers
Scaling MySQL Strategies for DevelopersScaling MySQL Strategies for Developers
Scaling MySQL Strategies for DevelopersJonathan Levin
 
2008 Collaborate IOUG Presentation
2008 Collaborate IOUG Presentation2008 Collaborate IOUG Presentation
2008 Collaborate IOUG PresentationBiju Thomas
 
AWR, ADDM, ASH, Metrics and Advisors.ppt
AWR, ADDM, ASH, Metrics and Advisors.pptAWR, ADDM, ASH, Metrics and Advisors.ppt
AWR, ADDM, ASH, Metrics and Advisors.pptbugzbinny
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2Alex Zaballa
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2Alex Zaballa
 
Oracle Database SQL Tuning Concept
Oracle Database SQL Tuning ConceptOracle Database SQL Tuning Concept
Oracle Database SQL Tuning ConceptChien Chung Shen
 
Database security best_practices
Database security best_practicesDatabase security best_practices
Database security best_practicesTarik Essawi
 
Odv oracle customer_demo
Odv oracle customer_demoOdv oracle customer_demo
Odv oracle customer_demoViaggio Italia
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAiougVizagChapter
 
Security Best Practice: Oracle passwords, but secure!
Security Best Practice: Oracle passwords, but secure!Security Best Practice: Oracle passwords, but secure!
Security Best Practice: Oracle passwords, but secure!Stefan Oehrli
 
My sql 56_roadmap_april2012
My sql 56_roadmap_april2012My sql 56_roadmap_april2012
My sql 56_roadmap_april2012sqlhjalp
 
Oracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxOracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxSatishbabu Gunukula
 
online training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBAonline training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBARavikumar Nandigam
 
IBM DB2 LUW/UDB DBA Training by www.etraining.guru
IBM DB2 LUW/UDB DBA Training by www.etraining.guruIBM DB2 LUW/UDB DBA Training by www.etraining.guru
IBM DB2 LUW/UDB DBA Training by www.etraining.guruRavikumar Nandigam
 
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In Hyderabad
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In HyderabadIBM DB2 LUW UDB DBA Online Training by Etraining Guru In Hyderabad
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In HyderabadRavikumar Nandigam
 

Similaire à DOAG - Oracle Database Locking Mechanism Demystified (20)

Oracle database locking mechanism demystified (AOUG)
Oracle database locking mechanism demystified (AOUG)Oracle database locking mechanism demystified (AOUG)
Oracle database locking mechanism demystified (AOUG)
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Less08 managing data and concurrency
Less08 managing data and concurrencyLess08 managing data and concurrency
Less08 managing data and concurrency
 
Scaling MySQL Strategies for Developers
Scaling MySQL Strategies for DevelopersScaling MySQL Strategies for Developers
Scaling MySQL Strategies for Developers
 
2008 Collaborate IOUG Presentation
2008 Collaborate IOUG Presentation2008 Collaborate IOUG Presentation
2008 Collaborate IOUG Presentation
 
AWR, ADDM, ASH, Metrics and Advisors.ppt
AWR, ADDM, ASH, Metrics and Advisors.pptAWR, ADDM, ASH, Metrics and Advisors.ppt
AWR, ADDM, ASH, Metrics and Advisors.ppt
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2
 
Oracle Database SQL Tuning Concept
Oracle Database SQL Tuning ConceptOracle Database SQL Tuning Concept
Oracle Database SQL Tuning Concept
 
Database security best_practices
Database security best_practicesDatabase security best_practices
Database security best_practices
 
Odv oracle customer_demo
Odv oracle customer_demoOdv oracle customer_demo
Odv oracle customer_demo
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_features
 
Security Best Practice: Oracle passwords, but secure!
Security Best Practice: Oracle passwords, but secure!Security Best Practice: Oracle passwords, but secure!
Security Best Practice: Oracle passwords, but secure!
 
My sql 56_roadmap_april2012
My sql 56_roadmap_april2012My sql 56_roadmap_april2012
My sql 56_roadmap_april2012
 
Oracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxOracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptx
 
My sql 5.6&MySQL Cluster 7.3
My sql 5.6&MySQL Cluster 7.3My sql 5.6&MySQL Cluster 7.3
My sql 5.6&MySQL Cluster 7.3
 
online training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBAonline training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBA
 
IBM DB2 LUW/UDB DBA Training by www.etraining.guru
IBM DB2 LUW/UDB DBA Training by www.etraining.guruIBM DB2 LUW/UDB DBA Training by www.etraining.guru
IBM DB2 LUW/UDB DBA Training by www.etraining.guru
 
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In Hyderabad
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In HyderabadIBM DB2 LUW UDB DBA Online Training by Etraining Guru In Hyderabad
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In Hyderabad
 

Plus de Pini Dibask

Oracle data guard for beginners
Oracle data guard for beginnersOracle data guard for beginners
Oracle data guard for beginnersPini Dibask
 
Winning performance challenges in oracle standard editions
Winning performance challenges in oracle standard editionsWinning performance challenges in oracle standard editions
Winning performance challenges in oracle standard editionsPini Dibask
 
Winning performance challenges in oracle multitenant
Winning performance challenges in oracle multitenantWinning performance challenges in oracle multitenant
Winning performance challenges in oracle multitenantPini Dibask
 
Winning performance challenges in oracle standard editions
Winning performance challenges in oracle standard editionsWinning performance challenges in oracle standard editions
Winning performance challenges in oracle standard editionsPini Dibask
 
Oracle Data Guard for Beginners
Oracle Data Guard for BeginnersOracle Data Guard for Beginners
Oracle Data Guard for BeginnersPini Dibask
 
IOUG Collaborate 18 - Get the Oracle Performance Diagnostics Capabilities You...
IOUG Collaborate 18 - Get the Oracle Performance Diagnostics Capabilities You...IOUG Collaborate 18 - Get the Oracle Performance Diagnostics Capabilities You...
IOUG Collaborate 18 - Get the Oracle Performance Diagnostics Capabilities You...Pini Dibask
 
IOUG Collaborate 18 - Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for BeginnersIOUG Collaborate 18 - Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for BeginnersPini Dibask
 
IOUG Collaborate 18 - ASM Concepts, Architecture and Best Practices
IOUG Collaborate 18 - ASM Concepts, Architecture and Best PracticesIOUG Collaborate 18 - ASM Concepts, Architecture and Best Practices
IOUG Collaborate 18 - ASM Concepts, Architecture and Best PracticesPini Dibask
 
RMOUG 18 - Winning Performance Challenges in Oracle Multitenant
RMOUG 18 - Winning Performance Challenges in Oracle MultitenantRMOUG 18 - Winning Performance Challenges in Oracle Multitenant
RMOUG 18 - Winning Performance Challenges in Oracle MultitenantPini Dibask
 
OOW 17 - database consolidation using the oracle multitenant architecture
OOW 17 - database consolidation using the oracle multitenant architectureOOW 17 - database consolidation using the oracle multitenant architecture
OOW 17 - database consolidation using the oracle multitenant architecturePini Dibask
 
OUGN winning performnace challenges in oracle Multitenant
OUGN   winning performnace challenges in oracle MultitenantOUGN   winning performnace challenges in oracle Multitenant
OUGN winning performnace challenges in oracle MultitenantPini Dibask
 
Collaborate 17 - Database consolidation using the oracle multitenant architec...
Collaborate 17 - Database consolidation using the oracle multitenant architec...Collaborate 17 - Database consolidation using the oracle multitenant architec...
Collaborate 17 - Database consolidation using the oracle multitenant architec...Pini Dibask
 
Pini Dibask - Oracle Database Locking Mechanism Demystified (Presentation)
Pini Dibask - Oracle Database Locking Mechanism Demystified (Presentation)Pini Dibask - Oracle Database Locking Mechanism Demystified (Presentation)
Pini Dibask - Oracle Database Locking Mechanism Demystified (Presentation)Pini Dibask
 
Database Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitectureDatabase Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitecturePini Dibask
 
Database Consolidation using Oracle Multitenant
Database Consolidation using Oracle MultitenantDatabase Consolidation using Oracle Multitenant
Database Consolidation using Oracle MultitenantPini Dibask
 
Ensuring Data Protection Using Oracle Flashback Features - Presentation
Ensuring Data Protection Using Oracle Flashback Features - PresentationEnsuring Data Protection Using Oracle Flashback Features - Presentation
Ensuring Data Protection Using Oracle Flashback Features - PresentationPini Dibask
 
Best New Features of Oracle Database 12c
Best New Features of Oracle Database 12cBest New Features of Oracle Database 12c
Best New Features of Oracle Database 12cPini Dibask
 
Ensuring Data Protection Using Oracle Flashback Features
Ensuring Data Protection Using Oracle Flashback FeaturesEnsuring Data Protection Using Oracle Flashback Features
Ensuring Data Protection Using Oracle Flashback FeaturesPini Dibask
 

Plus de Pini Dibask (18)

Oracle data guard for beginners
Oracle data guard for beginnersOracle data guard for beginners
Oracle data guard for beginners
 
Winning performance challenges in oracle standard editions
Winning performance challenges in oracle standard editionsWinning performance challenges in oracle standard editions
Winning performance challenges in oracle standard editions
 
Winning performance challenges in oracle multitenant
Winning performance challenges in oracle multitenantWinning performance challenges in oracle multitenant
Winning performance challenges in oracle multitenant
 
Winning performance challenges in oracle standard editions
Winning performance challenges in oracle standard editionsWinning performance challenges in oracle standard editions
Winning performance challenges in oracle standard editions
 
Oracle Data Guard for Beginners
Oracle Data Guard for BeginnersOracle Data Guard for Beginners
Oracle Data Guard for Beginners
 
IOUG Collaborate 18 - Get the Oracle Performance Diagnostics Capabilities You...
IOUG Collaborate 18 - Get the Oracle Performance Diagnostics Capabilities You...IOUG Collaborate 18 - Get the Oracle Performance Diagnostics Capabilities You...
IOUG Collaborate 18 - Get the Oracle Performance Diagnostics Capabilities You...
 
IOUG Collaborate 18 - Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for BeginnersIOUG Collaborate 18 - Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for Beginners
 
IOUG Collaborate 18 - ASM Concepts, Architecture and Best Practices
IOUG Collaborate 18 - ASM Concepts, Architecture and Best PracticesIOUG Collaborate 18 - ASM Concepts, Architecture and Best Practices
IOUG Collaborate 18 - ASM Concepts, Architecture and Best Practices
 
RMOUG 18 - Winning Performance Challenges in Oracle Multitenant
RMOUG 18 - Winning Performance Challenges in Oracle MultitenantRMOUG 18 - Winning Performance Challenges in Oracle Multitenant
RMOUG 18 - Winning Performance Challenges in Oracle Multitenant
 
OOW 17 - database consolidation using the oracle multitenant architecture
OOW 17 - database consolidation using the oracle multitenant architectureOOW 17 - database consolidation using the oracle multitenant architecture
OOW 17 - database consolidation using the oracle multitenant architecture
 
OUGN winning performnace challenges in oracle Multitenant
OUGN   winning performnace challenges in oracle MultitenantOUGN   winning performnace challenges in oracle Multitenant
OUGN winning performnace challenges in oracle Multitenant
 
Collaborate 17 - Database consolidation using the oracle multitenant architec...
Collaborate 17 - Database consolidation using the oracle multitenant architec...Collaborate 17 - Database consolidation using the oracle multitenant architec...
Collaborate 17 - Database consolidation using the oracle multitenant architec...
 
Pini Dibask - Oracle Database Locking Mechanism Demystified (Presentation)
Pini Dibask - Oracle Database Locking Mechanism Demystified (Presentation)Pini Dibask - Oracle Database Locking Mechanism Demystified (Presentation)
Pini Dibask - Oracle Database Locking Mechanism Demystified (Presentation)
 
Database Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitectureDatabase Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant Architecture
 
Database Consolidation using Oracle Multitenant
Database Consolidation using Oracle MultitenantDatabase Consolidation using Oracle Multitenant
Database Consolidation using Oracle Multitenant
 
Ensuring Data Protection Using Oracle Flashback Features - Presentation
Ensuring Data Protection Using Oracle Flashback Features - PresentationEnsuring Data Protection Using Oracle Flashback Features - Presentation
Ensuring Data Protection Using Oracle Flashback Features - Presentation
 
Best New Features of Oracle Database 12c
Best New Features of Oracle Database 12cBest New Features of Oracle Database 12c
Best New Features of Oracle Database 12c
 
Ensuring Data Protection Using Oracle Flashback Features
Ensuring Data Protection Using Oracle Flashback FeaturesEnsuring Data Protection Using Oracle Flashback Features
Ensuring Data Protection Using Oracle Flashback Features
 

Dernier

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 

Dernier (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

DOAG - Oracle Database Locking Mechanism Demystified

  • 1. Oracle Database Locking Mechanism Demystified Pini Dibask, Product Manager for Database Solutions November 17th 2016
  • 2. Confidential2 • Pini Dibask, Product Manager, Database Solutions (Quest) • Oracle DBA since 2006 • Oracle Certified Professional DBA (OCP) • My Blog: OracleDBPro.BlogSpot.com Pini.Dibask@Quest.com http://Linkedin.com/in/pinidibask @pini_dibask About Me
  • 3. Confidential3 About • Quest is now an independent company again! • Simplifies IT management • #1 independent software company for Database Tools • Driven by innovation “Spend less time on what you need to do, and more time on what you want to do!” • Committed to providing great products and superior support
  • 4. Confidential4 • Overview of Locks in Database Management Systems • Oracle Database Locking Mechanism Concepts • Advanced Locking Scenarios • Monitoring Locks using Dictionary Views and Tools Agenda
  • 5. Confidential5 Overview of Locks in Database Management Systems
  • 6. Confidential6 • Why locks? Because Databases need to support multiple user applications • Used to ensure Database Consistency and Integrity • Affect the interaction of readers and writers • Every DBMS has its own implementation of locking mechanism Overview of Database Locks
  • 8. Confidential8 • Reader never blocks reader • Reader never blocks writer (except: SELECT .. FOR UPDATE) • Writer never blocks reader (except rare scenario of distributed transaction) • Writer might block writer (depends on the operation) High Level Overview Reader Writer Reader No Block No Block Writer No Block Block
  • 9. Confidential9 • Oracle blocks can be modified during execution of DMLs • Undo Tablespace holds “before” image of Database Blocks • During SELECT query Oracle reads undo images if needed • This provides 2 important features: • Non-Blocking Queries • Read Consistency Writer Never Blocks Reader - How? “Before” Image placed in Undo Tablespace Session updates a record Oracle reconstructs the block using undo image Undo Tablespace
  • 10. Confidential10 • 2 Lock Modes in general: • Share Lock – Many can be acquired on a resource • Exclusive Lock – Only one can be acquired on a resource • Example - User updates a row in table EMPLOYEES • Row will be locked in exclusive mode • Table will be locked in share mode Lock Modes
  • 11. Confidential11 • When? During DML statements: Insert, update, delete, merge, select … for update • DML operations acquire 2 lock types: • Row Locks (AKA “TX Lock”) • Table Locks (AKA “TM Lock”) DML Locks
  • 12. Confidential12 • Oracle uses row-level locking during DML operations • Modified rows will be locked in exclusive lock mode • Oracle stores lock information in the containing data block header • No overhead with Oracle row-level locking mechanism DML Row Locks (“TX Locks”)
  • 13. Confidential13 Session #2 SQL> UPDATE employees SET name = 'Mark' WHERE id = 1; 1 row updated. Session #1 SQL> CREATE TABLE employees (id NUMBER, name VARCHAR2 (20)); Table created. SQL> INSERT INTO employees VALUES (1, 'David'); 1 row created. SQL> INSERT INTO employees VALUES (2, 'Jason'); 1 row created. SQL> commit; Commit complete. DML Row Locks (“TX Locks”) - Demo SQL> UPDATE employees SET name = 'Peter' WHERE id = 2; 1 row updated. Row already locked by session #1 SQL> UPDATE employees SET name = 'John' WHERE id = 2; (waiting – session is blocked)
  • 14. Confidential14 • Oracle automatically locks tables (share mode) involved in DML operations • Prevent DDL operations which may conflict with running transactions Table Locks (“TM Locks”) Cont’d EMPLOYEE_ID LAST_NAME EMAIL HIRE_DATE JOB_ID MANAGER_ID DEPARTMENT_ID 100 King SKING 17-JUN-87 AD_PRES 90 101 Kochhar NKOCHHAR 21-SEP-89 AD_VP 100 90 102 De Hann LDEHANN 13-JAN-93 AD_VP 100 90 103 Hunold AHUNOLD 03-JAN-90 IT_PROG 102 60 Table EMPLOYEES Table lock acquired Exclusive row lock (TX) acquired Row being updated
  • 15. Confidential15 • There are 6 lock modes (LMODE and REQUEST columns in V$LOCK) • [0, 1] – No lock • 2 – (RS) Row Share • 3 – (RX) Row Exclusive (DML Operations) • 4 – (S) Share • 5 – (SSX) Share Row Exclusive • 6 – (X) Exclusive (DDL operations) Table Locks (“TM Locks”) 2 3 4 5 6 2 Block 3 Block Block Block 4 Block Block Block 5 Block Block Block Block 6 Block Block Block Block Block TM Blocking Matrix
  • 16. Confidential16 DML Locks - Demo SQL> UPDATE employee 2 SET last_name = 'Jones' 3 WHERE employee_id = 139; 1 row updated. SQL> SELECT type, lmode FROM v$lock WHERE sid = 383; TYPE LMODE ----- ---------- TX 6 TM 3 (Session ID #383) Row of employee_id #139 is locked in LMODE 6 - Exclusive (x) Table EMPLOYEE is locked in LMODE 3 - Row Exclusive Table Lock (RX) SQL> SELECT object_name, session_id, oracle_username, locked_mode FROM v$locked_object JOIN dba_objects USING (object_id); OBJECT_NAME SESSION_ID ORACLE_USERNAME LOCKED_MODE ---------------- ------------- ----------------------- ----------------- EMPLOYEE 383 SALES 3
  • 17. Confidential17 • Protect definition of schema objects during DDL statements • Exclusive Locks (LMODE = 6) • Most DDL Operations (e.g. ALTER TABLE, DROP TABLE) • Other sessions cannot execute DML or DDL on the object • Share Locks • Allow data concurrency for similar operations • Only modified objects are locked - Oracle never locks entire Data Dictionary DDL Locks
  • 18. Confidential18 • Problem • DDL commands (e.g. ALTER TABLE, DROP TABLE) require exclusive locks (LMODE = 6) • It’s hard to acquire exclusive lock on frequently accessed object • Solution • DDL_LOCK_TIMEOUT parameter (available from Oracle 11g) • Specifies time limit for how long DDL statements will wait in DML lock queue • Default value is 0 • Can be set at session level (ALTER SESSION) or instance level (ALTER SYSTEM) DDL Locks Cont’d
  • 19. Confidential19 Session #1 SQL> UPDATE employee SET last_name = 'Jones' WHERE employee_id = 139; 1 row updated. DDL Locks - Demo SQL> alter system set ddl_lock_timeout=10; System altered. SQL> drop table employee; drop table employee * ERROR at line 1: ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired Session #2 SQL> drop table employee; drop table employee * ERROR at line 1: ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired Table already locked in share mode Available from version 11g Oracle waits 10 seconds before raising this error
  • 20. Confidential20 • Oracle automatically manages locks • Locks will be released once transaction is over • Lowest lock level will be used for maximum concurrency • Oracle Database never escalates locks • Ordering of locks is based on FIFO (First-In-First-Out) How Oracle Manages Locks?
  • 21. Confidential21 FIFO Lock Ordering - Demo Session #1 SQL> SELECT * FROM employees; EMP_ID NAME DEPT_ID ---------- ------------ ---------- 1 David 3 2 John 4 SQL> UPDATE employees SET name = 'Greg' WHERE emp_id = 1; 1 row updated. Session #2 SQL> LOCK TABLE employees IN EXCLUSIVE MODE; (waiting – session is blocked) Session #3 SQL> UPDATE employees SET name = 'Daniel' WHERE emp_id = 2; (waiting – session is blocked)
  • 22. Confidential22 • It is possible to override Oracle’s default locking mechanisms • Should be avoided unless there is a justified application requirement Example: Transaction needs exclusive access to resource and must not wait for other transactions • Manual row-level locks: SELECT … FOR UPDATE statement • Manual table-level locks: LOCK TABLE statement Manual Data Locks
  • 23. Confidential23 Manual Row Locks - Demo Session #1 SQL> SELECT id, name FROM employees WHERE id = 2 FOR UPDATE; ID NAME ------------------------------ 2 Jason Session #2 SQL> UPDATE employees SET name = 'Mark' WHERE id = 1; 1 row updated. SQL> UPDATE employees SET name = 'John' WHERE id = 2; (waiting – session is blocked)
  • 24. Confidential24 Manual Table Locks - Demo • LOCK TABLE IN [ ROW SHARE | ROW EXCLUSIVE | SHARE | SHARE ROW EXCLUSIVE | EXCLUSIVE ] MODE Session #1 (SID 385) SQL> SELECT * FROM employees FOR UPDATE; ID NAME ------------------------------ 2 Jason Session #2 (SID 195) SQL> LOCK TABLE employees IN ROW SHARE MODE; Table(s) Locked. SQL> LOCK TABLE employees IN EXCLUSIVE MODE; (waiting - session is blocked) SQL> SELECT sid, lmode acquired, request, blocking_session, SQL_TEXT FROM v$lock l JOIN v$session s USING (sid) LEFT JOIN v$sqlarea USING (sql_id) WHERE block = 1 OR request > 0 ; SID ACQUIRED REQUEST BLOCKING_SESSION SQL_TEXT ---------- --------------- ---------- ---------------------- ------------------------------------------------ 385 3 0 195 2 6 385 LOCK TABLE employees in exclusive mode
  • 26. Confidential26 • 2 sessions, each one locking resource that other session wants • At this stage both could become blocked forever • Oracle automatically detects deadlock scenarios • One of 2 sessions will be “Deadlock Victim” • Oracle performs statement-level rollback Deadlocks Session 1 Session 2 Resource 1 Resource 2 Is holdingIs holding Wants
  • 27. Confidential27 SQL> UPDATE employee SET first_name = 'Mark' WHERE employee_id = 39; (Waiting - session is blocked) Deadlocks - Demo Session #1 SQL> UPDATE employee SET first_name = 'David' WHERE employee_id = 151; 1 row updated. SQL> UPDATE employee SET first_name = 'John' WHERE employee_id = 151; (Waiting - session is blocked) Session #2 SQL> UPDATE employee SET first_name = 'Greg' WHERE employee_id = 39; 1 row updated. Row already locked by session #2 ORA-00060: deadlock detected while waiting for resource Row already locked by session #1 Statement has been rolled-back
  • 28. Confidential28 • Deadlock error (ORA-00060) is also audited in Alert Log Deadlocks Cont’d orcl11_ora_3600.trc
  • 29. Confidential29 Deadlocks Cont’d orcl11_ora_3600.trc (cont’d) Session 584 (sid 584) is still waiting with this statement The statement that has been rolled-back (“This session”)
  • 30. Confidential30 • Most common scenario of blocked inserts: • 2 sessions insert same value for column that has unique or primary key • Another scenario that involves tables with foreign keys • Row inserted/deleted on the parent table • Row inserted to the child table - may be blocked Blocked Inserts
  • 31. Confidential31 Session #2 SQL> insert into employees values (1, 'David'); (waiting – row already locked by session #1) Blocked Inserts - Demo Session #1 SQL> CREATE TABLE employees ( id NUMBER, name VARCHAR2 (20), CONSTRAINT pk_id PRIMARY KEY (id) ); Table created. SQL> insert into employees values (1, 'John'); 1 row created. * ERROR at line 1: ORA-00001: unique constraint (SALES.PK_ID) violated SQL> commit; Commit complete.
  • 32. Confidential32 Session #2 SQL> insert into employees values (1, 'David'); (waiting – row already locked by session #1) Blocked Inserts - Demo Cont’d Session #1 SQL> CREATE TABLE employees ( id NUMBER, name VARCHAR2 (20), CONSTRAINT pk_id PRIMARY KEY (id) ); Table created. SQL> insert into employees values (1, 'John'); 1 row created. SQL> rollback; Rollback complete. 1 row created.
  • 33. Confidential33 • Oracle Database places full table lock (LMODE = 4) on child table when: • Unindexed foreign key column on child table • Session updates parent table’s primary key • Session deletes row from parent table • Increases probability for deadlocks • Best practice - foreign key columns should be indexed • Exception - Matching primary key or unique key never updated or deleted Unindexed Foreign Keys
  • 34. Confidential34 Unindexed Foreign Keys Cont’d DEPARTMENT__ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID 60 IT 103 1400 90 Executive 100 1700 Parent Key Primary key of referenced table Unindexed Foreign Key EMPLOYEE__ID LAST_NAME EMAIL HIRE_DATE JOB_ID MANAGER_ID DEPAETMENT_ID 100 IT SKING 17-JUN-87 AD_PRES 90 101 Executive NKOCHHAR 21-SEP-89 AD_VP 100 90 102 De Hann LDEHANN 13-JAN-93 AD_VP 100 90 103 Hunold AHUNOLD 03-JAN-90 IT_PROG 102 60 Full table lock acquired Exclusive row lock (TX) acquired Primary key modified Table EMPLOYEES (Dependent Child Table) Table DEPARTMENTS (Referenced or Parent Table) EMPLOYEES table is locked Session updates value of primary key
  • 35. Confidential35 Indexed Foreign Keys Full table lock acquired Exclusive row lock (TX) acquired Row being deleted DEPARTMENT__ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID 60 IT 103 1400 90 Executive 100 1700 280 Event Planning 1700 Parent Key Primary key of referenced table Table DEPARTMENTS (Referenced or Parent Table) Indexed Foreign Key EMPLOYEE__ID LAST_NAME EMAIL HIRE_DATE JOB_ID MANAGER_ID DEPAETMENT_ID 100 King SKING 17-JUN-87 AD_PRES 90 101 Kochhar NKOCHHAR 21-SEP-89 AD_VP 100 90 102 De Hann LDEHANN 13-JAN-93 AD_VP 100 90 103 Hunold AHUNOLD 03-JAN-90 IT_PROG 102 60 Table EMPLOYEES (Dependent Child Table) Session deletes a row DMLs are allowed on EMPLOYEES
  • 37. Confidential37 • V$SESSION - Lists session information for each current session • V$LOCK/DBA_LOCK - Lists all locks currently held and all requests for a lock • V$LOCKED_OBJECT - Lists sessions holding locks on what objects and in what mode • DBA_BLOCKERS - Lists sessions holding a lock that blocks another session • DBA_WAITERS - Lists sessions that are waiting for a lock Monitoring locks via Oracle Dictionary Views
  • 38. Confidential38 Monitoring locks via Oracle Dictionary Views Cont’d SQL> SELECT DECODE (blocking_session, null, null, 'BLOCKED') status, sid, lmode, request, ctime duration, USER, program, blocking_session, DECODE (request, 0, NULL, SQL_TEXT) SQL_TEXT FROM v$lock l JOIN v$session s USING (sid) LEFT JOIN v$sqlarea USING (sql_id) WHERE block = 1 OR request > 0 ORDER BY status STATUS SID LMODE REQUEST DURATION USER PROGRAM BLOCKING_SESSION SQL_TEXT ----------- ---------- ---------- ---------- ---------- ------- ----------- ---------------------------- ------------------------------------------------ BLOCKED 195 4 5 16581 SALES sqlplus.exe 385 lock table employees in share row exclusive mode BLOCKED 13 0 3 10129 SALES Toad.exe 385 insert into employees values (1, 'Jason') 385 4 0 16575 SALES sqlplus.exe Real-Time Monitoring
  • 45. Confidential45 • Is lock a bad thing? No! Locks are essential! • Hold locks as long as you need, but not more than you need • Avoid Manual Locking unless it is justified • Foreign keys in most cases should be indexed • Proactively monitor your Database to identify blocked sessions • Modify application code if needed Summary