db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dag.Wan...@Sun.COM (Dag H. Wanvik)
Subject Re: drop table does not delete .dat files
Date Mon, 05 Nov 2007 15:18:30 GMT
Knut Anders Hatlen <Knut.Hatlen@Sun.COM> writes:

> Fabian Merki <fabian2007@merkisoft.ch> writes:
>
>>> > hi all
>>> >
>>> > i've just recognized that drop table does not delete .dat files.  is
>>> > this a feature or a bug? google did not help to answer this question
>>> > ;-(
>>> 
>>> Hi Fabian,
>>> 
>>> Are the dat files still there after you have performed a shutdown of the
>>> database? (DriverManager.getConnection("jdbc:derby:mydb;shutdown=true"))
>>> 
>>> -- 
>>> Knut Anders
>>
>> hi knut
>>
>> thanks for your reply.
>> the shutdown did clean up the dat file (table and index). but is there
>> another way - i'd like to keep the db running if possible.
>
> I think the unused dat files are deleted during the checkpoint (which is
> invoked when you have 10 MB of transaction logs), so they'll eventually
> go away. 

Yes, unless you have backed up the database with log archival mode
set:
http://db.apache.org/derby/docs/10.3/ref/rrefbackupdbenablelogproc.html


> I don't know of any way to trigger a checkpoint manually (other
> than shutting down the database or performing lots of updates) or if

There is the SYSCS_UTIL.SYSCS_CHECKPOINT_DATABASE system procedure.

Thanks,
Dag

> there's another way to delete the files.
>
> -- 
> Knut Anders

Mime
View raw message