I have a nice query that gives me the date of last full backup, size and location, even when I backup to multiple backup files.
what I don't have is an estimate of the total backup size (for each of the DB files).
Basically, how much disk space in each drive I will need in order to do this restore?
I have been trying with
RESTORE FILELISTONLY FROM DISK=N'C:\SQL Server\BACKUP\my_backup_FULL_20190324_190109.bak'
but I could not work out the total disk space required for the restored-to-be database.
I got the size from the restore filelistonly
above however, the size of the original db in disk is the following:
Best Answer
If I think you want this in a
SELECT
statement for multiple databases, the below code is a good startGot the script from here
One caveat is the created table differs in various versions of sql server in the above link he handles that also. change the script according to you.