We are looking for a job to do the following:
· Check if there are any databases in one of the below states:
o recovery/recovering
o restoring
o offline
o suspect
· If it finds a database meeting this criteria, wait for 5 minute delay and check again.
· If still in same state, raise an error to error log, and have job report failure.
Thanks in advance.