Q

How to handle locking

I want to redesign the lock of an unlock policy for tables (or row of them) in a multithreading environment. What

needs a lock? How do I lock them (update, full lock)? How do I prevent deadlocking? Oracle will handle your locking for you. You do not have to code anything. Oracle's policy is that writers only block writers, they do not block readers. I would highly suggest that you get a copy of Tom Kyte's "Expert one-on-one Oracle book". It contains good examples of how transaction processing occurs in the Oracle database.

You could use the DBMS_LOCK package to implement your own locking, but this does not lock any tables. It only locks sections of code in your application. So I doubt that you want to use this...

This was first published in May 2004

Dig deeper on Oracle database design and architecture

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close