set dbs before clearing