---
title: "DB2 Locks Helpful Points to Read now"
description: "In DB2 locking is very important to improve performance. How DB2 applies lock, a programmer also can control which lock to take. This is just an awesome information with examples and PPT on DB2 locks."
url: https://srinimf.com/2017/01/15/the-best-db2-lock-technic-saves-valuable-resources/
date: 2017-01-15
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2017/01/pexels-photo-843229.jpeg?fit=1880%2C1181&ssl=1
categories: ["DB2 Locks"]
tags: ["DB2 Locks PPT with examples", "How to select DB2 lock for best performance"]
type: post
lang: en
---

# DB2 Locks Helpful Points to Read now

**1. What are the different lock levels available?**

PAGE, TABLE , TABLESPACE and ROW (new lock from [DB2 v10](https://srinimf.com/2010/03/21/db2-new-features/))

**Also Read |** [The complete Db2 locking in Just few days.](https://srinimf.com/wp-content/uploads/2017/01/the-keys-to-understanding-locking.pdf)

**2. How does DB2 determines what lock-size [to use](https://srinimf.com/2019/10/24/python-loop-control-statements-real-syntax/) (Best Technic)?**

- Based on lock-size given while creating Table space
- Programmer can direct the DB2 what lock-size to use
- If lock size ‘ANY’ is specified, DB2 uses lock-size for PAGE

**3. What are the disadvantages of PAGE level lock?**

High resource utilization, if large updates to be done. (This lock causes high resource utilization).

**4. What is lock escalation?**

Promotes PAGE lock size to Table or Table Space lock-size, when a transaction has acquired more locks than specified in NUMLKTS. Locks  should be taken on objects in single tablespace for escalation to happen

**5. What are the various locks available**?

SHARE, EXCLUSIVE and UPDATE

**6. Can I use lock on a View**?

No, this is not possible. But, it applies lock on base table.

Related[Optimizing DB2 Logic: Efficient Strategies to Reduce Locking Overhead](https://srinimf.com/2020/09/23/4-db2-technics-to-avoid-locking/)

Related

Related[3 Top DB2 Concurrency Problems and Need of Locking](https://srinimf.com/2016/07/29/how-db2-uses-locks-to-control-concurrency/)

- [3 Top DB2 Concurrency Problems and Need of Locking](https://srinimf.com/2016/07/29/how-db2-uses-locks-to-control-concurrency/)DateJuly 29, 2016
- [DB2 Alternate Isolation Level Option for ‘UR’](https://srinimf.com/2016/01/08/db2-alternate-isolation-level-option-for-ur/)DateJanuary 8, 2016
- [Optimizing DB2 Logic: Efficient Strategies to Reduce Locking Overhead](https://srinimf.com/2020/09/23/4-db2-technics-to-avoid-locking/)DateSeptember 23, 2020

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2017%2F01%2F15%2Fthe-best-db2-lock-technic-saves-valuable-resources%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2017%2F01%2Fpexels-photo-843229.jpeg%3Ffit%3D1200%252C754%26ssl%3D1&description=DB2%20Locks%20Helpful%20Points%20to%20Read%20now)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2017/01/15/the-best-db2-lock-technic-saves-valuable-resources/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2017/01/15/the-best-db2-lock-technic-saves-valuable-resources/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2017/01/15/the-best-db2-lock-technic-saves-valuable-resources/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2017/01/15/the-best-db2-lock-technic-saves-valuable-resources/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20DB2%20Locks%20Helpful%20Points%20to%20Read%20now&body=https%3A%2F%2Fsrinimf.com%2F2017%2F01%2F15%2Fthe-best-db2-lock-technic-saves-valuable-resources%2F&share=email)
-

### Like this:

Like Loading…
