We keep 3 months of historic data. Is it possible to get the row count of a table on any previous date?
The date might be 1,2 or 3 months old.
I can get the size of the table but is there any method to get row count?
I don't think that is possible unless you have some metadata capturing process defined capturing table details before and after execution of the loading jobs...
You can get the row count only when you have an Timsewtamp column,which will be updated when you insert or update the record in the table. So that we can get the row count using the Timestamp variable from the Table.
Thanks for the replies folks.
We have a housekeeping job that keeps a record of all the sizes of tables as well as databases, but only 90 days old.
You can calculate the size of row using the data types used in table definition and probably can do some maths to calculate the number of rows using currentperm consumed against the rowsize. You can probably get close to the number of rows but I am not sure how accurate those results would be.....