467,198 Members | 1,025 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,198 developers. It's quick & easy.

How does threads work in DB

VK
Hello All,

I have a question on Database threads, would like to know how does
they work.

Suppose I select Table A which has got around 50k rows of data, while
my select is running another user tries to truncate the table A using
Alter Table will my select thread get's killed... or the Alter table
command will execute after my select command is completed.
How will I kill all the select command exclusively using Alter Table
Command.
I used UDB 8.0
Thanks

Jul 11 '07 #1
  • viewed: 1263
Share:
1 Reply
VK wrote:
Hello All,

I have a question on Database threads, would like to know how does
they work.

Suppose I select Table A which has got around 50k rows of data, while
my select is running another user tries to truncate the table A using
Alter Table will my select thread get's killed... or the Alter table
command will execute after my select command is completed.
How will I kill all the select command exclusively using Alter Table
Command.
I used UDB 8.0
Thanks
VK,

In general what you call a thread is commonly refered to as a SESSION or
a CONNECTION.
Now, If you are truncating or otherwise ALTER or DROP a table the
statement will wait until all existing sessions have cleared the table
and it will prevent new access to the table.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jul 11 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by lawrence | last post: by
8 posts views Thread by andrewpalumbo@hotmail.com | last post: by
5 posts views Thread by Bart Nessux | last post: by
6 posts views Thread by RahimAsif@hotmail.com | last post: by
4 posts views Thread by MSDousti | last post: by
3 posts views Thread by tshad | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.