Allow tags to be used to control which db to connect to

This allows the connection to be controlled to, say, connect to a db in the same data centre