cancel
Showing results for 
Search instead for 
Did you mean: 

Need a SQL script to determine how much compressed and uncompressed size of all archives.

modemis
Level 3
Partner Accredited Certified

Hello all.

 

Can anyone help with a request?  I need a SQL query to give me a total of compressed and uncompressed data that resides in vault stores.  The customer wants to find out how big the data will grow if they migrate all to PST files.

Thank you ahead of time.

 

Melih

1 ACCEPTED SOLUTION

Accepted Solutions

JesusWept3
Level 6
Partner Accredited Certified

This should work for you, just replace EVVSYourVaultStore_1 with the name of your Vault Store Database

 

SELECT A.ArchiveName "Archive Name",
       SUM(S.ItemSize)/1024 "Compressed Size (MB)",
       SUM(SP.OriginalSize)/1024/1024 "Uncompressed Size (MB)"
FROM   EnterpriseVaultDirectory.dbo.Archive A,
       EnterpriseVaultDirectory.dbo.Root R,
       EVVSYourVaultStore_1.dbo.ArchivePoint AP,
       EVVSYourVaultStore_1.dbo.Saveset S,
       EVVSYourVaultStore_1.dbo.SavesetProperty SP
WHERE  A.RootIdentity = R.RootIdentity
  AND  R.VaultEntryId = AP.ArchivePointId
  AND  AP.ArchivePointIdentity = S.ArchivePointIdentity
  AND  S.SavesetIdentity = SP.SavesetIdentity
GROUP BY A.ArchiveName
ORDER BY A.ArchiveName
https://www.linkedin.com/in/alex-allen-turl-07370146

View solution in original post

10 REPLIES 10

JesusWept3
Level 6
Partner Accredited Certified

This should work for you, just replace EVVSYourVaultStore_1 with the name of your Vault Store Database

 

SELECT A.ArchiveName "Archive Name",
       SUM(S.ItemSize)/1024 "Compressed Size (MB)",
       SUM(SP.OriginalSize)/1024/1024 "Uncompressed Size (MB)"
FROM   EnterpriseVaultDirectory.dbo.Archive A,
       EnterpriseVaultDirectory.dbo.Root R,
       EVVSYourVaultStore_1.dbo.ArchivePoint AP,
       EVVSYourVaultStore_1.dbo.Saveset S,
       EVVSYourVaultStore_1.dbo.SavesetProperty SP
WHERE  A.RootIdentity = R.RootIdentity
  AND  R.VaultEntryId = AP.ArchivePointId
  AND  AP.ArchivePointIdentity = S.ArchivePointIdentity
  AND  S.SavesetIdentity = SP.SavesetIdentity
GROUP BY A.ArchiveName
ORDER BY A.ArchiveName
https://www.linkedin.com/in/alex-allen-turl-07370146

John_Santana
Level 6

Thanks for sharing it here mate !

is it possible to differentiate the data that is Exchange Mailbox vs. the FSA carchived files ?

JesusWept3
Level 6
Partner Accredited Certified
Yeah, just put in the following in the WHERE clause AND R.ArchiveType=9
https://www.linkedin.com/in/alex-allen-turl-07370146

John_Santana
Level 6

ok, I've finally made it working by using this script below:

it is R.type = 9 :) thanks for the pointer Jesus.

SELECT A.archivename                      "Archive Name", 
       Sum(S.itemsize) / 1024             "Compressed Size (MB)", 
       Sum(SP.originalsize) / 1024 / 1024 "Uncompressed Size (MB)" 
FROM   enterprisevaultdirectory.dbo.archive A, 
       enterprisevaultdirectory.dbo.root R, 
       EVVaultstore1.dbo.archivepoint AP, 
       EVVaultstore1.dbo.saveset S, 
       EVVaultstore1.dbo.savesetproperty SP 
WHERE  A.rootidentity = R.rootidentity 
       AND R.vaultentryid = AP.archivepointid 
       AND AP.archivepointidentity = S.archivepointidentity 
       AND S.savesetidentity = SP.savesetidentity 
       AND R.type = 9 
GROUP  BY A.archivename 
ORDER  BY A.archivename 

John_Santana
Level 6

Thanks for the reply Jesus,

What's the type code forthe FSA / file archive ?

9 is for Exchange Archive, I need the FSA code if available.

modemis
Level 3
Partner Accredited Certified

Thank you Jesus.

However, when I run the query on the MBX Vault store I get a result of 37TB compressed and 42TB uncompressed but when I check the disk size, I only see 4TB worth of DVS files on all drives in total.

Am I doing something wrong?

Thanks again.

John_Santana
Level 6

Modemis,

The uncompressed size is the total disk space usage on the target (Exchnage or File server), while the compressed size is the save set disk usage in EV VaultStore.

Merv
Level 6
Partner

FYI Archive Types:

Exchange Journal - 17 
Exchange Mailbox -  9
FSA  -  129
Shared Archive -  5
Domino Journal -   513
Domino Mailbox -  1025

John_Santana
Level 6

Merv,

What is shared archive used for / by ?

Merv
Level 6
Partner

from the help file on the vault admin console

An archive can be used by many users. For each user who needs to use an archive, you have to grant access to that archive. An individual user may have access to many archives.

Every user also has a personal archive that is not shared with any other users. Those users who have access to a shared archive can make Enterprise Vault send specific folders to the shared archive, rather than to the personal archive.

BTW Public Folder - 33