Return-Path: X-Original-To: apmail-db-derby-user-archive@www.apache.org Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 70E32DECA for ; Tue, 13 Nov 2012 23:28:06 +0000 (UTC) Received: (qmail 6165 invoked by uid 500); 13 Nov 2012 23:28:06 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 6069 invoked by uid 500); 13 Nov 2012 23:28:05 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 6056 invoked by uid 99); 13 Nov 2012 23:28:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2012 23:28:04 +0000 X-ASF-Spam-Status: No, hits=1.0 required=5.0 tests=FORGED_YAHOO_RCVD,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2012 23:27:58 +0000 Received: from telerig.nabble.com ([192.168.236.162]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1TYPtI-0005Xc-Nl for derby-user@db.apache.org; Tue, 13 Nov 2012 15:27:36 -0800 Message-ID: <34676336.post@talk.nabble.com> Date: Tue, 13 Nov 2012 15:27:36 -0800 (PST) From: Oskar Zinger To: derby-user@db.apache.org Subject: Re: How to reset Derby Database in JVM In-Reply-To: <5076B913.2090803@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: oskarzn@yahoo.com References: <1349919328.3013.YahooMailNeo@web162802.mail.bf1.yahoo.com> <5076B913.2090803@oracle.com> X-Virus-Checked: Checked by ClamAV on apache.org 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. Thanks, Oskar Zinger Rick Hillegas-3 wrote: > > On 10/10/12 6:35 PM, Oskar Zinger wrote: >> Hi Derby Community, >> >> I'm having some difficulties resetting a Derby Database without >> restarting the whole application (JVM). >> >> I'm deploying Derby Network Server. My application has a service that >> executes shutdown / start of the Derby Network Server on demand. >> >> // code here to clear Derby connection pool >> derbyServer.shutdown(); >> derbyServer = null; >> >> The above does not reset the Derby database. > Hi Oskar, > > This may be relevant to the problem you are seeing: When you shutdown > the server, that does not shut down any booted databases and it does not > shutdown the Derby engine. Instructions for shutting down a single > database and the entire engine can be found in the Derby Developer's > Guide in the section titled "Shutting down Derby or an individual > database": http://db.apache.org/derby/docs/10.9/devguide/ > > Hope this helps, > -Rick >> >> For example, what if my database becomes corrupted and I would like to >> stop the service, remove the database, and copy over my new template >> database (or recreate the database) without having to restart my whole >> application. Is this possible? >> >> Thanks, >> Oskar Zinger > > > -- View this message in context: http://old.nabble.com/How-to-reset-Derby-Database-in-JVM-tp34541038p34676336.html Sent from the Apache Derby Users mailing list archive at Nabble.com.