473,382 Members | 1,329 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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
1 1360
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: lawrence | last post by:
I notice that when my weblog software tries to contact www.weblogs.com, to use the update service, my whole site (all PHP) slows down. Contacting www.weblogs.com can take a long time. I can't...
8
by: andrewpalumbo | last post by:
I'm trying to write some code which will split up a vector into two halves and run a method on the objects in the vector using two seperate threads. I was hoping to see a near linear speedup on an...
5
by: Bart Nessux | last post by:
Could someone explain the concept of threads and how I might use them in Python? I was a math major, not a CS major (theory instead of practice). Most of my programming knowledge has grown out of...
6
by: Mitch | last post by:
My background thread is being terminated when my application exixts. However, it does not receive a ThreadAbortException so I am unable to cleanly diconnect from a remote object (which makes the...
6
by: RahimAsif | last post by:
Hi guys, I would like some advice on thread programming using C#. I am writing an application that communicates with a panel over ethernet, collects data and writes it to a file. The way the...
4
by: MSDousti | last post by:
Hi I have written a VB .NET app, which uses several threads. I thought that when the user closes the main window (when MainForm.closed event occures, and I call application.exit) all running...
9
by: bonk | last post by:
Does anyone have a simple example on how to prohibit that any thread other than the current thread modifies a certain object (a collection) while we are in a certain section of the code? In other...
5
by: Coaster | last post by:
I am designing a process which will spawn a good number of threads and some of them will execute a c++ process which is quite memory intensive (although not multithreaded). This will run on a 2 cpu...
34
by: Creativ | last post by:
Why does Thread class not support IDisposable? It's creating quite some problem. Namely, it can exhaust the resource and you have not control over it.
3
by: tshad | last post by:
I need to find out how many threads a process has. I have used ThreadPool.GetAvailableThreads and ThreadPool.GetMaxThreads, but they both show 50 for worker threads and 100 for port threads. ...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.