db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: curious problem dropping triggers and tables
Date Wed, 14 Apr 2010 07:19:05 GMT
On 04/13/10 11:03 PM, gmbradford wrote:
> I have a java application that gets a copy of a Derby database that is
> transferred to it over a network. (The sending end freezes the DB and then
> sends the files over a socket.) The receiving jvm closes the socket and
> streams when the database transfer is complete, and then connects to it to
> do some sql. The sql includes delete statements, drop trigger statements,
> and drop table statements. The delete statements consistently work fine, but
> the drop trigger and drop table statements don't always work (sometimes they
> do). When they don't, we see SqlSyntaxErrorException, with the complaint
> that the trigger or table does not exist. We can't look at the DB while this
> jvm is running because it's using embedded mode, but when it's stopped, ij
> shows that the triggers and tables exist and from ij the drops work fine.
>
> I'm wondering if anyone has an idea why this might be happening.
>   

Perhaps it's executing the DROP statements in the wrong schema? The
default schema of a Derby session is the same as the user name. You can
change that by executing SET SCHEMA <schemaName>, or you can qualify the
table/trigger name with the schema name (e.g., DROP TRIGGER
MYSCHEMA.MYTRIGGER).

-- 
Knut Anders


Mime
View raw message