ctdbGetFirstActiveDatabase() retrieves the database handle of the first active database. ctdbGetFirstActiveDatabase() returns NULL if the session contains no active databases.