db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oskar Zinger <oska...@yahoo.com>
Subject Re: How to reset Derby Database in JVM
Date Wed, 14 Nov 2012 02:14:56 GMT

Actually, it does work for a Client / Server - the only problem is with
executing the remote shutdown - the SQL State code that is returned is
different from a designated local execution. This happens when the error
return is "database not found" if the database has not been booted yet or
has already been shutdown.

The same issue happens when a successful shutdown occurs - but now the Error
Code is different.

However, in all of this the database does get successfully shutdown.

I have opened an issue for this:
https://issues.apache.org/jira/browse/DERBY-5994

I need to be able to execute this remotely, from the Backup Derby to
shutdown the Primary Derby before starting replication.

Thanks,
Oskar


kmarsden wrote:
> 
> On 11/13/2012 3:27 PM, Oskar Zinger wrote:
>> Hi Rick,
>>
>> Thank you for the pointers to the right places in the documentation.
>>
>> Here is what I used:
>> Shutting down the system:
>> http://db.apache.org/derby/docs/10.8/devguide/tdevdvlp20349.html
>> Shutting down Derby or an individual database:
>> http://db.apache.org/derby/docs/10.8/devguide/tdevdvlp40464.html
>>
>> I am using Derby Network Server... and I think it would have helped if
>> the
>> documentation mentioned somewhere that this same approach would work for
>> Client / Server deployment of Derby. Somehow it seemed to me this would
>> have
>> only worked for an Embedded deployment of Derby.
> I think that it will only work really well for Embedded. Shutting down 
> remotely can lead to protocol errors and also prevent you from getting 
> the nested exception for the SQLException returned because the system is 
> shutdown.
> 
>   If you are using embedded Server I would recommend using the embedded 
> URL if you can.
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/How-to-reset-Derby-Database-in-JVM-tp34541038p34676747.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message