I have SampleDB.bak file. Is it possible to read Db Name within this .bak file without restoring?
Below query will give you the logical file(Data file and Log File) name of the backup.
RESTORE FILELISTONLY FROM DISK = 'D:\MyBackups\Backup.bak'
Fore more info on FILELISTONLY
You can use below TSQL query
RESTORE HEADERONLY FROM DISK='D:\Database\Northwind.bak'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With