Forum Discussion

sandrine_goetha's avatar
7 years ago

Scripts for archived amount on a specific date

Hello,

I'm pretty sure this was already asked and answered but unfortunately I can't find it.

I was asked by my storage admin the amount of data which was archived on Saturday night.

Does anybody has a sql scripts giving me this ?

I use EV11.0.1 CH5 for microsoft Exchange

Thank you

Sandrine

  • Hi Sandrine, I use the below. You need to run this against each Vault Store database. ("dd", -31) is for the last 31 days, you can therefor use -2 (or 3) to get it for the last 2 or 3 days.

    --Daily Rate
    SELECT "Archived Date" = left (convert (varchar, archiveddate,20),10),"Daily Rate" = count (*),"MB (orig)" = sum (originalsize)/1024/1024,"MB (in EV)" = sum (itemsize)/1024
    from saveset with (nolock) inner join savesetproperty with (nolock) ON saveset.savesetidentity = savesetproperty.savesetidentity
    where archiveddate > dateadd("dd", -31, getdate ())
    group by left (convert (varchar, archiveddate,20),10)
    order by "Archived Date" desc

3 Replies

  • Hi Sandrine, I use the below. You need to run this against each Vault Store database. ("dd", -31) is for the last 31 days, you can therefor use -2 (or 3) to get it for the last 2 or 3 days.

    --Daily Rate
    SELECT "Archived Date" = left (convert (varchar, archiveddate,20),10),"Daily Rate" = count (*),"MB (orig)" = sum (originalsize)/1024/1024,"MB (in EV)" = sum (itemsize)/1024
    from saveset with (nolock) inner join savesetproperty with (nolock) ON saveset.savesetidentity = savesetproperty.savesetidentity
    where archiveddate > dateadd("dd", -31, getdate ())
    group by left (convert (varchar, archiveddate,20),10)
    order by "Archived Date" desc

  • Don't forget about the Items Archival Rate report in EV's reporting component. It may be suitable if you need a prettier output, if you want to schedule the report on a recurring basis, or if you just feel more pointy-clicky than SQL-y.

     

     

    --Chris