question

JinalContractor-2125 avatar image
0 Votes"
JinalContractor-2125 asked SeeyaXi-msft commented

Notification for SQL Database when stay on restoring mode.

Hello,
Is there way to set up notification when SQL database stay on restoring mode.
I've Report Database restore every night from Live database and sometimes stuck on restoring mode and I would like to get notified when DB stay on restoring mode.


THank you

sql-server-general
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @JinalContractor-2125 ,

We have not received a response from you. Did the reply could help you? If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.

0 Votes 0 ·

Hi @JinalContractor-2125

Just checking in to see if above information was helpful. If you have any further updates on this issue, please feel free to post back. If you think my reply is helpful to you, please remember to mark it as an answer. Warm thanks.

Best regards,
Seeya

0 Votes 0 ·
ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered

What do you mean with "stuck"? Is it "stuck" for days? Or does it eventually complete? A restore should normally not be stuck.

You could schedule a job that runs M minutes after the restore starts, and which sends a mail if the database is still in the restoring state, as listed in sys.databases.

M is a value that is well beyond the time it normally takes to restore the database.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SeeyaXi-msft avatar image
0 Votes"
SeeyaXi-msft answered

Hi @JinalContractor-2125,

sometimes stuck on restoring mode

You mean that the restoration takes a long time, but the restoration will succeed, right?
-If YES, please see this similar thread.
-If you are hanging in the process of restoring, please see this:
Here are some situations of Stuck in Restoring State.

Best regards,
Seeya

If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.