Previous Topic

Next Topic

Dropping a Database

When you drop a database from a session, the database information is removed from the session dictionary, but the database dictionary file is left untouched. The drop database operation can be reversed with an add database operation. Drop a database from a session by calling ctdbDropDatabase().

/* drop MyDatabase from current session */
if (ctdbDropDatabase(hSession, “MyDatabase”) != CTDBRET_OK)
{
   printf(“Drop database failed\n”);
}