Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am
No new posts Adding a userid to SMTP Security table Yolanda Harvey JCL & VSAM 1 Sun Aug 13, 2017 6:16 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us