How to retrieve the size of a database in restoring mode
- by Marc Wittke
With pure SQL - how to do it?
I doubt it is possible, since even the SQL Management Studio fails to show the size of such a database in the UI.
Already tried:
exec sp_helpdb 'DbInRecMode'
...won't show anything;
exec sys.sp_helpfile 'DbInRecMode'
... something like file not found (Msg 15325)
Main pitfall seems to be the issue, that
select * from DbInRecMode.dbo.sysfiles
won't work when the database is in restoring mode. Any ideas?