'RESTORE HEADERONLY FROM DISK ServerName column

I've a LocalDB instance (localdb)\foo (version 12.0.6024.0) and a database called myDB.

I backup the database and perform this query: RESTORE HEADERONLY FROM DISK = 'C:\\myDB.bak';

In ServerName column is not (localdb)\foo as expected.

different ServerName

How to get the original ServerName from the BAK file? Or to decode the displayed one?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source