Delete a physical bdb database file
706271Jun 10 2009 — edited Jun 12 2009Lets 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