Database GUID
How about a miscellaneous SQL scalar function DATABASEID() with the same parameters as NEWIDSTRING() that returns a read-only GUID stored in the .ADD file upon creation or restore. Against a free table connection, NULL would be appropriate.
This would facilitate identification of database replicas.
A database restore should always generate a new GUID to avoid creating indistinguishable replicas, although an optional restore parameter to prevent a new GUID might be appropriate. Of course a database could be copied, but this is difficult to detect and probably would not be used to create a new replica.
1
vote