1

Is there a way to associate a description with database snapshot?

I usually name snapshots using original database name and timestamp:

DBName-05-27-2016_1018

I would like to be able to associate a comment like "Before executing schema update scripts related to feature NNN" with a snapshot.

This is something that I could put in database extended properties but since snapshot is read-only it is not possible after it is created and it doesn't look like extended properties can be specified as a part of snapshot creation. Making these comments a part of snapshot name is ugly.

Is there any other way to associate a metadata with database snapshot when it is created? Of course I can maintain a table in separate utility database just for this but this is not too convenient.

1

Is there any other way to associate a metadata with database snapshot when it is created?

No. Since a database snapshot is read-only, you cannot modify or add any settings to it. In-fact, extended properties cannot be applied to it.

So your best option is to have a table in the database (or a utility database) called e.g. dbo.database_snapshot_history with columns like servername, databasename, snapshotname, createBY, createdate

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.