IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

locking a DB2 table


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bittu
Warnings : 1

New User


Joined: 07 Jan 2007
Posts: 19
Location: Bangalore

PostPosted: Thu Feb 21, 2008 5:19 pm
Reply with quote

Hi,

can anybody suggest me that how to lock a table in db2 to generate a contention issue.
actually the requirement is like that only, there are some fatal error messages which need to be validated. for this i need some mechanism to lock the table and finally when i run the program it will show that fatal error message about table contention.

thanks in advance,
Back to top
View user's profile Send private message
ravi17s
Warnings : 1

New User


Joined: 15 Aug 2003
Posts: 57

PostPosted: Fri Feb 22, 2008 9:07 am
Reply with quote

Use the LOCK TABLE statement to override DB2’s rules for choosing initial lock attributes. Two examples are:

LOCK TABLE table-name IN SHARE MODE;
LOCK TABLE table-name PART n IN EXCLUSIVE MODE;



Executing the statement requests a lock immediately.

The bind option RELEASE determines when locks acquired by LOCK TABLE or LOCK TABLE with the PART option are released.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top