1. At a computer system, a method comprising: encoding a logical server name and logical database name in a data structure to send to access a physical database or partition corresponding to the logical database; providing at least the logical server name to a domain name system server; receiving a network address corresponding to the logical server name from the domain name system server; sending the data structure to a gateway reachable via the network address, the gateway operable to determine a physical server that hosts the physical database and to act as a proxy in obtaining data from the physical database; negotiating one or more parameters of a connection with the gateway; receiving, via the connection, a request to provide credentials; and providing the credentials via the connection.