Switch db according to use_db.
Support catshome db.