The problem is that DbUtils has no access to the DQE instance used at runtime, and the name overwriting is done inside the DQE. SqlServer connects first to the service you named in the connection string and then it connects to the initial catalog. In sqlserver you can access any catalog the user has access to from there, as you're connected to the service AND to the initial catalog (but that's not the only catalog you're allowed to connect to).
When there's a catalog name present in the query, that catalog is used otherwise sqlserver uses the catalog you're already connected to, the initial catalog.
If you want to do this through code, instead of through configuration (which indeed is a problem with sharepoint), you should set the catalognameoverwrites in the DynamicQueryEngine inside a DAO instance as there the DQE instance is known. Unfortunately, the constructor of the DAO classes instantiate the DQE:
public CustomerDAO() : base(InheritanceInfoProviderSingleton.GetInstance(), new DynamicQueryEngine(), InheritanceHierarchyType.None, "CustomerEntity", new CustomerEntityFactory())
...
What should happen here is that instead of new DynamicQueryEngine(), a method should be called which allows extension to this so you can add the overwrites there, perhaps indeed by a call to DbUtils which uses only static data.
However with a change in the template 'dao.template' (by creating a copy, and by creating a new templatebindings file to bind the copy to the templateID SD_EntityDAOTemplate, see SDK for details on this) so it calls your custom method which allows injection of a hashtable of type CatalogNameOverwriteHashTable (it's a type in the ORMSupportClasses, used in Adapter), and which sets the DQE property PerCallCatalogNameOverwrites it will allow overwrites on SelfServicing as well.
It's however more cumbersome than simply setting things.
We'll try to fix this in v3 with a change to the selfservicing code base so this will be easier.