I have a database that has lost one of its .ndf
files and have been unable to get at the data. The .ndf
file in question was added last Thursday and placed in a temporary storage location by a colleague (d'oh!). There is no backup available from this database since prior to this .ndf
being created. I have seen numerous solutions to similar problems when the .ndf
in question is its own filegroup, but in this case it actually is in a filegroup with an additional file which I want to try and get data from. I am pretty sure what I am trying to do is not possible but there is always a chance right?
The database setup
- PRIMARY:
Data.mdf
-200mb - Data Filegroup 1:
Data_1.ndf
- 2.9gb Data_2.ndf
- 64gb (newly added file that is now lost - I believe it is just preallocated space)LOG:
Log.ldf
- 128mb
When we logged into the VM this morning (hosted in Azure), we were presented with an unexpected shutdown notification from Windows (it seems there was a powerloss/shutdown at 1am) and our application was not reaching the database. Looking in SQL Server Management Studio I could see that it was Recovery Pending status. Trying to bring the db online lead me to an error about Data_2.ndf
not being found (located at D:\SQL\Data\Data_2.ndf
).
When I accessed the D drive (temporary storage drive) I was presented with a wonderful blank Windows Explorer window - completely blank drive.
I was able to set the Data_2.ndf
file offline and bring the database itself online, however I am not able to query any of the data (as all tables were in Data Filegroup 1) due to the filegroup being offline. The other 3 files (mdf, ndf, ldf
) are all online.
Is there any way out of this? Any way to perhaps recover any remaining data from Data_1.ndf
or is it completely toast?
(This was a hastily stood up development server and there was no backup/recovery strategy for it, as "Azure never crashes" :)).
(Edit:formatting)