Subject | Re: [firebird-support] Re: unsuccessful metadata update object is in use |
---|---|
Author | Helen Borrie |
Post date | 2004-04-28T09:50:27Z |
At 09:20 AM 28/04/2004 +0000, you wrote:
by default when you start an isql session, or if you issue an isql command
from a command shell; but in isql (and in scripts that are run in isql)
you can vary that behaviour by using SET AUTODDL OFF.
What happens under the hood is that isql starts a read committed
transaction for each DDL command it receives, and commits it upon execution
of the single statement (unless there is an exception). It's a
client-initiated thing, just like all transactions.
If you are also running DML statements in the same session, they are in a
separate transaction (by default, in snapshot isolation). You have to
commit DML yourself.
If you are issuing a DDL command as a regular DSQL statement (as you are
doing in your Java code) then there is *no* autoddl, since autoddl is an
isql thing, it's not part of the DSQL statement set.
telling us about.
/heLen
>Anyways, normally the create statement(or any ddl statement for thatReally? Where did you get that from? AutoDDL is an isql setting. It's on
>matter) are auto-commit by nature.
by default when you start an isql session, or if you issue an isql command
from a command shell; but in isql (and in scripts that are run in isql)
you can vary that behaviour by using SET AUTODDL OFF.
What happens under the hood is that isql starts a read committed
transaction for each DDL command it receives, and commits it upon execution
of the single statement (unless there is an exception). It's a
client-initiated thing, just like all transactions.
If you are also running DML statements in the same session, they are in a
separate transaction (by default, in snapshot isolation). You have to
commit DML yourself.
>I checked the behavior in firebird and it works this way only.Only in isql and only if autoddl is on.
>In fact, the firebird offers*firebird* doesn't; but the program isql.exe does.
>ways to 'disable' this behavior too (by doing a set AutoDDL, which
>toggles the auto commit of ddl statements).
If you are issuing a DDL command as a regular DSQL statement (as you are
doing in your Java code) then there is *no* autoddl, since autoddl is an
isql thing, it's not part of the DSQL statement set.
>So, I'm not sure whether commit will help solve this problem.Then there is definitely something in your environment that you're not
>Although I tried it (more out of curiosity) and got the same "object
>is in use" error message (as expected).
telling us about.
/heLen