When restoring a database that has multiple files, SSMS gives you the option to restore as other paths and file names. How does it retrieve the list of files from the backup? Can I do that in a SQL script? C#? PS?
SQL Server – How SSMS Gets List of Files in a Backup
sql serversql server 2014ssms
Related Question
- SQL Server – Fix Error While Taking Backup Using SSMS
- Sql-server – Multiple databases, one backup file
- Sql-server – SSMS Restore Database Wizard questions while restoring to different destination
- SQL Server Backup – Does Adding Multiple Files Duplicate or Split Backup?
- SQL Server – Use sp_DatabaseRestore When Database Does Not Exist
- RDS SQL Server – Limit on Number of Backup Files for Restore
- SQL Server – How to Restore Database Using Full Backup and Transaction Logs in SSMS
Best Answer
Here is a simple script that might help you.
Works for me on SQL Server 2008 sp2
Part 1:
Part 2:
Have a look at these other answers too:
How to use variables with RESTORE FILELISTONLY
SQL Server “RESTORE FILELISTONLY” Resultset