cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for specific SQL query

BruceCrankshaw1
Level 3

Hi All

EV 12 SP2 site, I am looking for a SQL query that will tell me exactly what VS partition a particualr Saveset ID is assocaited with

I have a large, 12 server, 16,000 user environment with OSIS implemented but with multiple VS partitions and some of these partitions are not active. This customer is migrating there journal data to Mimecast and the migration is failing with " partitions arent accessible " 

Anyway I know the specific Saveset ID but I just need to know what query in SQL I can use to see what partition its stored on 

1 ACCEPTED SOLUTION

Accepted Solutions

Marcde
Moderator
Moderator
Partner    VIP    Accredited

Hi,

the following one might help: (Not really beautiful but should do the job)

USE <VaultStoreDB>
SELECT IdTransaction, PartitionEntry.IdPartition, PartitionEntry.PartitionRootPath from Saveset inner join [EnterpriseVaultDirectory].[dbo].PartitionEntry
on saveset.idPartition = PartitionEntry.IdPartition
where IdTransaction = '<TID_as_GUID>'

You could also perform a dumpsaveset operation which gives you the exact location of the dvs file and shared parts.

How to extract the Saveset and SIS parts of a specific archived item using EVSVR https://www.veritas.com/content/support/en_US/article.100022284

Regards

Marc

 

PMCS GmbH & Co. KG - A Serviceware Company
www.serviceware.de

View solution in original post

4 REPLIES 4

Marcde
Moderator
Moderator
Partner    VIP    Accredited

Hi,

the following one might help: (Not really beautiful but should do the job)

USE <VaultStoreDB>
SELECT IdTransaction, PartitionEntry.IdPartition, PartitionEntry.PartitionRootPath from Saveset inner join [EnterpriseVaultDirectory].[dbo].PartitionEntry
on saveset.idPartition = PartitionEntry.IdPartition
where IdTransaction = '<TID_as_GUID>'

You could also perform a dumpsaveset operation which gives you the exact location of the dvs file and shared parts.

How to extract the Saveset and SIS parts of a specific archived item using EVSVR https://www.veritas.com/content/support/en_US/article.100022284

Regards

Marc

 

PMCS GmbH & Co. KG - A Serviceware Company
www.serviceware.de

Thank Marc

Great suggestions 

 

@Marcde's query works well enough if there is just a single Vault Store, but if there are multiple Vault Stores then you can't join on IdPartition alone because that counter is reset for every Vault Store. That is, VaultStore01 has a partition with IdPartition = 0, and VaultStore02 also has a partition with IdPartition = 0. So if you join it this way and you have n Vault Stores, you will get n rows for each IdTransaction you query. Example from running your query in an environment with four Vault Stores:

bad.PNG

In order to deal with this possibility, you can join a few more tables to make sure you're returning IdPartitions only from the Vault Store to which the item you are querying belongs:

SELECT IdTransaction, 
	pe.IdPartition, 
	pe.PartitionRootPath 
FROM Saveset AS s
INNER JOIN ArchivePoint AS ap
	ON ap.ArchivePointIdentity = s.ArchivePointIdentity
INNER JOIN EnterpriseVaultDirectory.dbo.ArchiveView AS av
	ON av.VaultEntryId = ap.ArchivePointId
INNER JOIN EnterpriseVaultDirectory.dbo.VaultStoreEntry AS vse
	ON vse.VaultStoreEntryId = av.VaultStoreEntryId
INNER JOIN [EnterpriseVaultDirectory].[dbo].PartitionEntry AS pe
ON s.IdPartition = pe.IdPartition AND vse.VaultStoreEntryId = pe.VaultStoreEntryId
WHERE IdTransaction = 'A118899D-BCA8-11B9-E843-943B1EE4B751' --Substitute your own item's IdTransaction here

good.PNG

 

A little tricky to explain, but hopefully helpful to somebody...

@BruceCrankshaw1, if you have only one Vault Store, then you're fine to continue with Marc's query. If not, use the one above for more precise results.

--Chris

Marcde
Moderator
Moderator
Partner    VIP    Accredited

Thanks @ChrisLangevin , haven't had this in mind as I was writing the query. You are absolutely right.

PMCS GmbH & Co. KG - A Serviceware Company
www.serviceware.de