By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,924 Members | 1,651 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,924 IT Pros & Developers. It's quick & easy.

How does threads work in DB

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.