If you don't want the database to be tied to a project, then you need a central place where it can be accessed by other projects/sites
Use a connection string stored in a central place e.g. Web.Config of each web application. You could create multiple connection string with different names pointing to different database source e.g. RemoteConnection and LocalConnection.
Example
<add name="ApplicationServices"
connectionString="Local DB"
providerName="System.Data.SqlClient" />
<add name="ApplicationServices_2"
connectionString="Remote DB"
providerName="System.Data.SqlClient" />
When changing between local server and remote server, make sure the right connection has the name "ApplicationServices" and you won't need to change your code