Method to extract db name from connection string