Using lock table, PL-SQL Programming

Using LOCK TABLE

You use the LOCK TABLE statement to lock the whole database tables in the specified lock mode so that you can share or deny the access to them. For illustration, the statement below locks the emp table in the row share mode. The Row share locks permit concurrent access to the table; they avoid other users from locking the whole table for the restricted use. The Table locks are released when your transaction issues a commit or rollback.

LOCK TABLE emp IN ROW SHARE MODE NOWAIT;

The lock mode determines what other locks can be located on the table. For illustration, many users can obtain the row share locks on the table at the same time, excluding only one user at a time can obtain an exclusive lock. Whereas one user has an exclusive lock on the table, no other users can insert, delete, and update rows in that table.

Posted Date: 10/4/2012 5:21:05 AM | Location : United States







Related Discussions:- Using lock table, Assignment Help, Ask Question on Using lock table, Get Answer, Expert's Help, Using lock table Discussions

Write discussion on Using lock table
Your posts are moderated
Related Questions
Using Savepoints The scope of the savepoint is a transaction in which it is defined. The Savepoints defined in the major transaction are not related to the savepoints defined

Information Hiding   With the information hiding, you see only the details that are significant at a given level of algorithm and data structure design. The Information hiding

Managing Cursors The PL/SQL uses 2 types of cursors: implicit and explicit. The PL/SQL declares a cursor implicitly for all the SQL data manipulation statements, including th

Ending Transactions A good quality programming practice is to commit or roll back every transaction explicitly. Whether you rollback or issue the commit in your PL/SQL program

Subprograms The PL/SQL has two types of subprograms known as the procedures and functions that can take parameters and be invoked. As the following example represents, a subp

Consider the following set of database tables (same tables from Assignment 6-1). Please take note of foreign keys (most of them carry the same names as the corresponding primary ke

Use of Table Expressions - Expressing Constraint Conditions With the exception of key constraints, the examples in the theory book all explicitly reference at least one relvar

RETURN Statement The RETURN statement instantly completes the execution of a subprogram and returns control to the caller. The Execution then resumes with the statement below t

In Packages The Forward declarations also group logically related subprograms in the package. The subprogram specifications go in the package specification, & the subprogram b

If two relations R and S are joined, then the non matching tuples of both R and S are ignored in __________________.