Text and images pages

Text and image pages can use large portions of memory and are commonly known as space wastage. They exist as long as a parent data row points to the text and image pages. These pages come into existence when a null update is done against the columns.

Find the current status for the table:

sp_help<table name>

The text and image pages can be deallocated to open the space they occupy. Use the sp_chgattribute:

sp_chgattribute <table name>, “deallocate_first_txtpg”,1

This switches the deallocation on. To switch the deallocation off:

sp_chgattribute <table name>, “deallocate_first_txtpg”,0