Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

locking a DB2 table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: locking a DB2 table
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    Post subject: Reply to: locking a DB2 table
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us