I'm learning steps to recover from sql server OS or OS disk crash. Assuming the OS or OS disk is corrupted and unrecoverable.
I know that a HA solution like fci or ag is better suited to prevent such issues, but assume there is no fci/ag.
Assume:
- Sql server crashes at 04:40
- I have full backups from 1am and subsequent hourly log backups starting from 00:45.
- I have data and log files intact from the original machine (assuming only the OS or the OS went through an unrecoverable crash)
- Tail log backup cannot be taken because the OS has crashed and so the server is inaccessible
I have 3 options for recovery after installing the OS and sql server software:
Shutdown sql services, Restore master, msdb, ssisdb, and for user databases do the following: Apply full backup from 1am and subsequent 3 log backups which will get me upto 03:45. Therefore I loose almost 1 hours of data.
Shutdown sql services, restore master, msdb, ssisdb, copy the mdf/ldf files from the previous disk, move them into the new server, attach db. Therefore I don't loose any data.
Shutdown sql services, replace (not restore, not attach) system dbs master, msdb, ssisdb files; for user dbs - copy the mdf/ldf files from the previous disk, move them into the new server, attach db. Therefore I don't loose any data.
What is the recommendation of experienced database professionals on the above approaches?