views:

192

answers:

2

I have created a snapshot, AdventureWorksSS. Deleted a record after creating a snapshot.

When I query from AdventureWorksSS, deleted record shows up.

Where is that deleted record stored and how does Snapshot still retrieve the deleted record?

As far as I understand, snapshot is a pointer to the original database and fetches data only necessary. Do deleted data get inserted into snapshots automatically?

+1  A: 

this explaines it: http://msdn.microsoft.com/en-us/library/ms187054.aspx

KM
I can see that deleted records are stored on snapshot file during "copy-on-write operation".
Sung Meister
+1  A: 

Snapshot isolation level retrieves the previous row from the Version Store. The Version Store keeps track of all changes that affect a versioned row in tempdb.

Database snapshot does a copy on write of the affected pages and uses the OS sparse files feature.

Remus Rusanu