Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8C0D118446 for ; Thu, 17 Dec 2015 14:04:47 +0000 (UTC) Received: (qmail 44984 invoked by uid 500); 17 Dec 2015 14:04:47 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 44910 invoked by uid 500); 17 Dec 2015 14:04:47 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 44858 invoked by uid 99); 17 Dec 2015 14:04:45 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2015 14:04:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 6CA81C8427 for ; Thu, 17 Dec 2015 14:04:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.909 X-Spam-Level: ** X-Spam-Status: No, score=2.909 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id epFdK9gcBDPl for ; Thu, 17 Dec 2015 14:04:36 +0000 (UTC) Received: from mail-pf0-f178.google.com (mail-pf0-f178.google.com [209.85.192.178]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 6396C42A43 for ; Thu, 17 Dec 2015 14:04:36 +0000 (UTC) Received: by mail-pf0-f178.google.com with SMTP id v86so31455540pfa.2 for ; Thu, 17 Dec 2015 06:04:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=SMEmqtKuBAAD2IyVGT/juGDReT2AmnFiOq2UB2JrGqM=; b=AUhKqbv710rZl1oY+hvNvgKakUlUS5KrF45Ju2MMIbzKUkBWfX0wkulIn+QZUYrmAw Zn/ayacZ8NW4Dvmo0ezmLW3f4nN3Wlu+RAtvWWPC+83BgL8VxqcQFA38CcbvDwdWAUBW OR02Oc/lfmsuSreJz4buQgSqCMgUA7d8TWj4wI7thRibcPVm02UiSnv+OMS5OhgcJHpX oY6dmnF+A5lID2q1EnbgCdDNiM92BwYOocq4PTIRjQmihnaJ3mHio3XFE1nD1fnGja6M t98hKEjK2ufxLYnosh5uGCLmtPscE/d1WOk7iqkI+DW0sviVyo8UFES0ngHoNbYyXzbd 5HAg== X-Received: by 10.98.8.212 with SMTP id 81mr14429638pfi.165.1450361069183; Thu, 17 Dec 2015 06:04:29 -0800 (PST) Received: from Richards-MacBook-Pro-2.local ([2601:645:8101:9a10:682e:2e62:e7e8:62a6]) by smtp.gmail.com with ESMTPSA id dz6sm16232738pab.19.2015.12.17.06.04.28 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Dec 2015 06:04:28 -0800 (PST) Message-ID: <5672C0EB.7080608@gmail.com> Date: Thu, 17 Dec 2015 06:04:27 -0800 From: Rick Hillegas User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.7; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 To: Anjana Prakash CC: "derby-dev@db.apache.org" Subject: Re: freeze database during export References: <56721B80.6070200@gmail.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------070405080607010403000906" This is a multi-part message in MIME format. --------------070405080607010403000906 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 12/16/15 8:01 PM, Anjana Prakash wrote: > > Hi Rick, > > Thanks for follow-up. I found the issue. The export block was raising > exception due to incorrect table name. In that exception had missed to > call unfreeze > > Hence db never came out of freeze mode. > > On that note Is there way to detect if db is in freeze mode? > > Thanks, > > Anjana. > I don't know of any way to get this information through the public api. You can file an enhancement request for this feature. Thanks, -Rick > > *From:*Rick Hillegas [mailto:rick.hillegas@gmail.com] > *Sent:* Thursday, December 17, 2015 7:49 AM > *To:* derby-dev@db.apache.org > *Cc:* Anjana Prakash > *Subject:* Re: freeze database during export > > On 12/16/15 10:18 AM, Anjana Prakash wrote: > > Hi, > > Can derby system procedure SYSCS_FREEZE_DATABASE use before > SYSCS_EXPORT_TABLE and then SYSCS_UNFREEZE_DATABASE > > After export table. > > Will there be any impacts. > > Appreciate help on same. > > Thanks, > > Anjana > > The following script runs fine for me. Have you encountered a problem > with this approach? > > connect 'jdbc:derby:memory:db;create=true'; > > create table t1( a int primary key ); > insert into t1 values ( 1 ); > > call syscs_util.syscs_freeze_database(); > > -- succeeds > call syscs_util.syscs_export_table ( 'APP', 'T1', 't1.dat', null, > null, null ); > > -- this would hang if we attempted it > -- insert into t1 values ( 2 ); > > call syscs_util.syscs_unfreeze_database(); > > -- succeeds now > insert into t1 values ( 2 ); > > Hope this helps, > -Rick > --------------070405080607010403000906 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit On 12/16/15 8:01 PM, Anjana Prakash wrote:

Hi Rick,

Thanks for follow-up. I found the issue. The export block was raising exception due to incorrect table name. In that exception had missed to call unfreeze

Hence db never came out of freeze mode.

On that note Is there way to detect if db is in freeze mode?

Thanks,

Anjana.

I don't know of any way to get this information through the public api. You can file an enhancement request for this feature.

Thanks,
-Rick

From: Rick Hillegas [mailto:rick.hillegas@gmail.com]
Sent: Thursday, December 17, 2015 7:49 AM
To: derby-dev@db.apache.org
Cc: Anjana Prakash <anjana.prakash@actian.com>
Subject: Re: freeze database during export

On 12/16/15 10:18 AM, Anjana Prakash wrote:

Hi,

Can derby system procedure SYSCS_FREEZE_DATABASE use before �SYSCS_EXPORT_TABLE and then SYSCS_UNFREEZE_DATABASE

After export table.

Will there be any impacts.

Appreciate help on same.

Thanks,

Anjana

The following script runs fine for me. Have you encountered a problem with this approach?

connect 'jdbc:derby:memory:db;create=true';

create table t1( a int primary key );
insert into t1 values ( 1 );

call syscs_util.syscs_freeze_database();

-- succeeds
call syscs_util.syscs_export_table ( 'APP', 'T1', 't1.dat', null, null, null );

-- this would hang if we attempted it
-- insert into t1 values ( 2 );

call syscs_util.syscs_unfreeze_database();

-- succeeds now
insert into t1 values ( 2 );

Hope this helps,
-Rick


--------------070405080607010403000906--