Ben,
You could test this yourself in about a minute. I don't have a db in front
of me, but I'm pretty sure the truncate, or any ddl operation, will fail
telling you it couldn't get a nowait lock.
Try it. Create a table, say t (a varchar2(1)); Then, insert into t ('x');
Then insert into t select * from t; Do this many, many times until
it takes several seconds to execute. (If you commit between those
inserts, it'll be easier on your rollbacks.)
When you have all these rows inserted, open another SQL session.
Type truncate table t; but DONT press enter yet.
Back in the first window, run a long query on t, maybe union the
query with itself a few times, so that the query takes 10 or 11 seconds
to execute; that should give you enough time to switch to the truncate
window and hit enter.
Then see what happens, and you'll have your answer.
Simple, no?
Ben Poels wrote:
> Hi
>
> What happens if you truncate a table, or drop an index, that
> is currently in use by a long running query? Does the query
> fail or does the truncate/drop hang up?
> Thanks in advance,
>
> Ben
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Yosi Greenfield
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).