You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Anjana Prakash <an...@actian.com> on 2015/12/16 19:18:42 UTC

freeze database during export

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

RE: freeze database during export

Posted by Anjana Prakash <an...@actian.com>.
Hi Rick,

Thanks for follow-up will do as directed.

Thanks,
Anjana.

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

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<ma...@db.apache.org>
Cc: Anjana Prakash <an...@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


Re: freeze database during export

Posted by Rick Hillegas <ri...@gmail.com>.
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 <an...@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
>


RE: freeze database during export

Posted by Anjana Prakash <an...@actian.com>.
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.

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 <an...@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

Re: freeze database during export

Posted by Rick Hillegas <ri...@gmail.com>.
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