Dynamic setting of the database connection

Hello,
when an application is deployed, the first time the database is asked to match the application connection.

Would it be possible to dynamically change the association of the connection to a different db based on, for example, the user who connects?

Gianpaolo