November 20, 2006 at 5:07 am
Good day,
I am in the process of archiving 8 tables to another server. I will be deleting around 54 million rows from these 8 tables, and i want to know how best to get the data size of the rows i will be moving.
I know i can use sp_spaceused for the table size, but i want to be able to update all the 'bosses' on how much data will be removed from the database once i am finished.
Any ideas?
November 20, 2006 at 5:42 am
I've just found out, SP_SPACEUSED, without any tablenames, yields the total data size and the available space within a database.
I've just discovered 50Gb of space I didn't know about before, which is good news for me...but what YOU want to know is the flipside of free space, ie data size, and it will tell you this.
JB
November 20, 2006 at 9:11 pm
Just make sure you've run DBCC UPDATEUSAGE (0) prior to SP_SPACEUSED, otherwise results returned may be incorrect.
_____________
Code for TallyGenerator
November 21, 2006 at 12:52 pm
I think sp_spaceused with the table names, then extimating total size of deletion will be the most accurate way. That will include the index space that is being saved also. When you are done, I would suggest reindexing those tables to organize the indexes.
Thanks
Tom
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply