Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Delete a physical bdb database file

706271Jun 10 2009 — edited Jun 12 2009
Lets say, I have a bdb database file x. Now, how to delete this file ? Ofcourse you can’t just delete it via command line else there will in inconsistency in bdb logs.
I saw remove API and used it the following way but the file is not deleted yet: http://www.oracle.com/technology/documentation/berkeley-db/xml/java/com/sleepycat/db/Database.html#remove(java.lang.String,%20java.lang.String,%20com.sleepycat.db.DatabaseConfig)

// Get the database handle to the database name “dbToDelete”
Database dbHandle = GetDataBaseHandle(“DbToDelete”)

// Delete this database
dbHandle.rmove(“DbToDelete, DbToDelete, null);

It doesn’t work – any ideas why? Is this the wrong API? Or this API doesn’t remove the database from your system but updates its log to “delete” it?

Thanks
Neha
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 10 2009
Added on Jun 10 2009
2 comments
1,763 views