We've just experienced an issue where a newly attached Dev instance "picked up" schema changes that had been made to the previous Dev database but were not present in the Live DB replica before it was renamed and attached as Dev.
The Dev DB starts as a log shipping standby that is fully restored, detached, files are renamed and then re-attached as the new Dev DB. Note that the previous Dev database is not being deleted just detached. Also note that the old and new Dev DBs are both "forks" of the same original database.
Now this is a Dev/Test environment so it's not particularly problematic but it makes me worry that we'll create something against a silently changed Dev that will break Live when it's applied.
So my working theory is that this relates to the unique identifiers used by the SQL Server internals and possibly the timing of the changes to Dev.
Can anyone confirm this or shed any light on the issue?
EDIT: Further detail The schema changes involved the addition of new nullable columns at the end of a few tables. So they were admittedly minor and importantly did not involve any actual data. Also, the log shipping copy was in Standby until it was reattached (so read only) and I've reviewed the query logs to verify that no DDL changes were run.
That said, unfortunately I cannot replicate the issue. It does not happen with a small DB created just to test it and I deleted the Dev DB and recreated it from a full backup to resolve the issue so I cannot repeat the exact process.
My goal in asking the question is to ascertain whether we've experienced an exceptional fluke or our process is fundamentally unsound. I'm leaning toward exceptional fluke at the moment.