Remote db configuration should honour multistage stage

Added the current stage when retrieving the remote db configuration.