SQL Clone 4

The files behind the Clone have grown to be very large 

The differencing disk does not inflate except when there is a database write. Users have sometimes seen this grow very quickly when they had various automatic maintenance operations set up.

The amount of inflation depends on how much data in the clone is 'touched' by the filesystem. If a byte is changed, and then changed back to its original value, the clone will not deflate in response.

Reasons why a clone may inflate include:

  • Adding new data to the database
  • Updating existing data in the database
  • Deleting data from the database
  • Rebuilding database indexes
  • Adding files to FILESTREAM databases
  • Having Query Store enabled in the database
  • Enabling encryption like TDE
  • Any other operation that makes changes to the database files

Running substantial image modifications, and then cloning the modified image, may also cause clones to inflate. In this case, disabling database indexes just before the modification and then rebuilding them afterward may resolve this. For example:


MyImageModification.sql

ALTER INDEX MyIndex ON MyTable DISABLE;

UPDATE MyTable SET ... ;

ALTER INDEX MyIndex ON MyTable REBUILD;

Didn't find what you were looking for?