Calc space used by a client
Posted on 2006-04-06
I "sell" database storage space in a table called TABX. At one extreme, a customer can chose to store 1 small record in TABX, or (at the other extreme) store a million records each containing a 1gigabyte BLOB. Of course the average is more like 200 records with a dozen or so BLOBS.
Once per night, I need a uniform way of calculating approximate storage space used per client. So I can bill for space used ....
For discussion, let's say TABX is ...
CREATE TABLE dbo.TABX
ClientID int NOT NULL,
ItemID int NOT NULL IDENTITY (1, 1),
Fi image NULL,
Ft text NULL,
Fv varchar(8000) NULL
) ON [PRIMARY]
Any suggestions on how to approach this problem?
Using SQL Server Ver 8.0