CODE – TSQL Restore Database Backup

Get the Logical file name of the database from backup.

Use the values in the LogicalName Column.