November 28, 2010

Lock a table

Locking a table prevents two users to update a table at same time. 
Using locks we can prevent data replications. 
 
LOCK TABLE employees
   IN EXCLUSIVE MODE;
This exclusive mode enables the user to look into the rows but can update it.
And this command for remote link tables.
LOCK TABLE employees@DB
IN SHARE MODE 
 
The alternative for this is to use sequence in your table.It will also prevent data duplications. 

No comments:

Post a Comment

Thanks for your comments submitted.,will review and Post soon! by admin.

How I Identified 45 Configuration Gaps in an Oracle HCM Implementation — A Structured Approach

During a recent Oracle Fusion HCM implementation, I led a gap analysis that surfaced 45 configuration issues between the client's legacy...