Adds connection recovery logic to SqlDatabase.