DbConfig: extract method.

No functional changes.