sexta-feira, 9 de fevereiro de 2018

Reading SQL SERVER ERROR LOG

I had to run a update on a massive table from SQL SERVER, but ended up giving up on the task as it was taking too long and keeping from more important tasks.

After trying to kill the process unsuccesfully, I restarted the service and the database came up as recovery after the restart.

SQL SERVER 2008 or superior versions, can handle RECOVERY modes on their own, but to check on the status of the task, you check the SQL SERVER error log by executing this proc on your SQL SERVER:

EXEC sp_readerrorlog;

I know we have to be patient when doing database stuff, but its hard to be assertive with other people breathing down your neck.

Your SQL SERVER will show the evolution of the 3 steps to the recovery as follows:

2018-02-09 11:27:46.540 spid27s      Recovery of database 'dbx' (10) is 23% complete (approximately 2090 seconds remain). Phase 3 of 3. This is an informational message only. No user action is required.
2018-02-09 11:28:06.540 spid27s      Recovery of database 'dbx' (10) is 24% complete (approximately 2072 seconds remain). Phase 3 of 3. This is an informational message only. No user action is required.
2018-02-09 11:28:26.550 spid27s      Recovery of database 'dbx' (10) is 25% complete (approximately 2040 seconds remain). Phase 3 of 3. This is an informational message only. No user action is required.



Check out my new book about R Language http://www.amazon.com/dp/B00SX6WA06

Nenhum comentário:

Postar um comentário

Leave your comment here!