cancel
Showing results for 
Search instead for 
Did you mean: 

Scripts for archived amount on a specific date

sandrine_goetha
Moderator
Moderator
   VIP   

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

1 ACCEPTED SOLUTION

Accepted Solutions

GertjanA
Moderator
Moderator
Partner    VIP    Accredited Certified

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

Regards. Gertjan

View solution in original post

3 REPLIES 3

GertjanA
Moderator
Moderator
Partner    VIP    Accredited Certified

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

Regards. Gertjan

sandrine_goetha
Moderator
Moderator
   VIP   

Thank you So much Gertjan.

 

ChrisLangevin
Level 6
Employee

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.

 Capture.JPG

 

--Chris