You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Amandeep Singh <am...@spicelabs.in> on 2009/12/08 11:58:47 UTC
How to clear data in Memory used by JavaDB
Hi,
I am using JavaDB for In-Memory DataBase, but i want
that database to be removed after use from memory.How can i do so.
Regrads,
Amandeep Singh
Developer
Re: How to clear data in Memory used by JavaDB
Posted by Kristian Waagan <Kr...@Sun.COM>.
Amandeep Singh wrote:
> Hi,
>
> I am using JavaDB for In-Memory DataBase, but i want
> that database to be removed after use from memory.How can i do so.
Hello Amandeep,
The in-memory feature was marked as experimental in Derby 10.5, and
there isn't a proper mechanism to delete an in-memory database. However,
you can use a static method to do so. This is documented at
http://wiki.apache.org/db-derby/InMemoryBackEndPrimer
Verify that your database is deleted afterwards by trying to connect to
it (without using "create=true").
In Derby 10.6 [1] a database can be deleted using a JDBC connection URL
attribute, like
"jdbc:derby:memory:myDB;drop=true[;user=A;password=B]"
Also note that the static method mentioned above will be removed in
Derby 10.6.
Regards,
--
Kristian
[1] http://wiki.apache.org/db-derby/DerbyTenSixOneRelease (loose plan,
not much has been finalized yet)
>
> Regrads,
> Amandeep Singh
> Developer