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 00473D218 for ; Wed, 23 Jan 2013 02:40:26 +0000 (UTC) Received: (qmail 44612 invoked by uid 500); 23 Jan 2013 02:40:25 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 44496 invoked by uid 500); 23 Jan 2013 02:40:25 -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 44470 invoked by uid 99); 23 Jan 2013 02:40:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2013 02:40:24 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [72.30.239.198] (HELO nm31.bullet.mail.bf1.yahoo.com) (72.30.239.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2013 02:40:13 +0000 Received: from [98.139.212.149] by nm31.bullet.mail.bf1.yahoo.com with NNFMP; 23 Jan 2013 02:39:52 -0000 Received: from [98.139.212.233] by tm6.bullet.mail.bf1.yahoo.com with NNFMP; 23 Jan 2013 02:39:52 -0000 Received: from [127.0.0.1] by omp1042.mail.bf1.yahoo.com with NNFMP; 23 Jan 2013 02:39:52 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 99973.39044.bm@omp1042.mail.bf1.yahoo.com Received: (qmail 30687 invoked by uid 60001); 23 Jan 2013 02:39:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1358908791; bh=ujmv1qAQQ6VjqKozXRUzWwHN8iv0UjxizEQDJ3qDcl0=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=fFqM7I1aU7+APzEfilryd4QgcpFfpcmfEEEJttF1PlKRpOLMw9zqPbEZ52JUPZB9xG3yuoR7yAj5wycpZYum+2jlHo0hb48Xb5xcH17fJywqiwtYa9T3+Ld7/61WZbo5X1Gij8/UQD1ozEm5Nk5DOkcS8C/cywoL78mJY3s1heE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=KJRMnNi0paUXziKOd2emuj3uqwFiUZRGeZWAoh65IFJgAaWIG+cdYR69ct8XcJLcNEiru5xAva9IWr1FRkitBw37/ElDy/X4SfajanveTnMXkK5NpUZTmlhkL7zolwKbLs7aHCKS8+e1PJ5IpQWeU+wWkOWVtg6fuqJJP1RWVMA=; X-YMail-OSG: swcTQVQVM1n2Sim2C3ANwG0_m6k2v8TKbf00Dd9FqPxzg2X Ntja9nIDxvrMSIH8sWRxUyqEAhumVxneHamNjdjDx.zeq2GFOZII1mglgfPj gkmX0so2DCd.zCMjOg2oq3nb9lzwFKC8mUY2EkTs0v3ZmTiTvUgxVRGUK4YN 6KigvVYJXw6b8_747dQ.osDaMCTBESwLcQ4ue73HcuhxPTGRrSwuSD_dMxjH E_ewNcOp30qqS2tYRBRpowxPrw65l1unbLF.jXMWZKRlLmjq9keZFq1o003Y pZFxd4fD_GvxPAC_wkGSlsR9bNU9Xtj9B.iMmO.E0CcQDwB3xErS7IoqdvsG mErIb5LiJMaNLwJr305Ck2N9abegQglAOMpVyns_93LvBxlFE9MlSLjE1MEG uEPHoJ7DFVKr08RFW8pTEjlFdoPEomvcHwUU_niOTmepI6zfWvs2bpzK3NOd v8zGgzt50ke62TVmo4Ty5PSODbB.MgbvdD75eZTzgPQD97N_ro34Cmd91j3H fIGRvQQtkYlL3J3qIBHSPFc_od9Zoe9bCPtQK1h5DwwUYWNJM6lIUmAW2NFY 5DamnS_46xTgcRp25P1radeIcVE4- Received: from [24.193.76.99] by web162806.mail.bf1.yahoo.com via HTTP; Tue, 22 Jan 2013 18:39:51 PST X-Rocket-MIMEInfo: 001.001,SSdtIHVzaW5nIERlcmJ5IFJlcGxpY2F0aW9uIGluIG15IHByb2R1Y3QgYW5kIHRyeWluZyB0byBmaWd1cmUgb3V0IHdoYXQgaXMgdGhlIGJlc3QgYXBwcm9hY2ggZm9yICJzdG9wcGluZyIgdGhlIGRhdGFiYXNlIGJlZm9yZSBzdGFydGluZyByZXBsaWNhdGlvbiAoYmVmb3JlIGNvcHlpbmcgdGhlIGRhdGFiYXNlIGZyb20gTWFzdGVyIHRvIFNsYXZlKS4KCkknbSBjdXJyZW50bHkgdXNpbmcgInNodXRkb3duIiBhcHByb2FjaC4uLiBhcyBkZXNjcmliZWQgaW4gdGhlIGZvbGxvd2luZyBEZXJieSAxMC44IGRvY3UBMAEBAQE- X-Mailer: YahooMailWebService/0.8.130.496 Message-ID: <1358908791.26335.YahooMailNeo@web162806.mail.bf1.yahoo.com> Date: Tue, 22 Jan 2013 18:39:51 -0800 (PST) From: Oskar Zinger Reply-To: Oskar Zinger Subject: Derby Replication - Freeze DB or Shutdown - Best Practice? To: Derby-User MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-1675512583-1687034511-1358908791=:26335" X-Virus-Checked: Checked by ClamAV on apache.org ---1675512583-1687034511-1358908791=:26335 Content-Type: text/plain; charset=us-ascii I'm using Derby Replication in my product and trying to figure out what is the best approach for "stopping" the database before starting replication (before copying the database from Master to Slave). I'm currently using "shutdown" approach... as described in the following Derby 10.8 documentation (it says to make sure the database is shutdown cleanly): http://db.apache.org/derby/docs/10.8/adminguide/cadminreplicstartrun.html If you look at the Derby replication write-up - it tells you to "freeze the DB" using command "call SYSCS_UTIL.SYSCS_FREEZE_DATABASE(), here is the write-up I'm referring to: http://wiki.apache.org/db-derby/ReplicationWriteup These two seem to be conflicting... and therefore the question: what is the best practice to "stopping the db" before the start of replication? Also, when you think about it, when you shutdown the DB before copying the database and starting replication, what if there is a thread running in JVM that will reboot the database before you get a chance to copy the database, and when you finally start replication - then the databases will be again out of sync. This did not actually happen to me in practice, but I think theoretically it is possible. So does it mean freeze is better? And then do I need to unfreeze it? Thanks! Oskar Zinger ---1675512583-1687034511-1358908791=:26335 Content-Type: text/html; charset=us-ascii
I'm using Derby Replication in my product and trying to figure out what is the best approach for "stopping" the database before starting replication (before copying the database from Master to Slave).

I'm currently using "shutdown" approach... as described in the following Derby 10.8 documentation (it says to make sure the database is shutdown cleanly):
http://db.apache.org/derby/docs/10.8/adminguide/cadminreplicstartrun.html

If you look at the Derby replication write-up - it tells you to "freeze the DB" using command "call SYSCS_UTIL.SYSCS_FREEZE_DATABASE(), here is the write-up I'm referring to:
http://wiki.apache.org/db-derby/ReplicationWriteup

These two seem to be conflicting... and therefore the question: what is the best practice to "stopping the db" before the start of replication?

Also, when you think about it, when you shutdown the DB before copying the database and starting replication, what if there is a thread running in JVM that will reboot the database before you get a chance to copy the database, and when you finally start replication - then the databases will be again out of sync. This did not actually happen to me in practice, but I think theoretically it is possible. So does it mean freeze is better? And then do I need to unfreeze it?

Thanks!
Oskar Zinger

---1675512583-1687034511-1358908791=:26335--