switch database on the fly