db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <rick.hille...@gmail.com>
Subject Re: freeze database during export
Date Thu, 17 Dec 2015 14:04:27 GMT
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
>


Mime
View raw message