It depends a bit on which DBMS/DBD you are using. Some, like MySQL, allow you to open a database handle directly to a remote server. With others you may need to use a combination of DBI::ProxyServer and DBD::Proxy, both part of the DBI distribution.
Comment on Re: How can i connect to database on remote server