cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Query for Orphaned Indexes

Scott__Hastings
Level 5
Partner Accredited Certified

I'm sure this can be done, but my brain isn't big enough.

We have some old indexes that don't seem to be associated with an archive. Can someone help me with a query to to identify "orphaned index folders/volumes?

 

 

Thanks!!

Scott D Hastings Sr
1 ACCEPTED SOLUTION

Accepted Solutions

TonySterling
Moderator
Moderator
Partner    VIP    Accredited Certified

If someone made copies of an index then there is an original that is accounted for in the db.  EV won't know about the copy.

 

 

View solution in original post

9 REPLIES 9

TonySterling
Moderator
Moderator
Partner    VIP    Accredited Certified

If the indexes are not associated with an archive I do not think they would be in SQL.

JimmyNeutron
Level 6
Partner Accredited
Wouldnt they just show up as null values?

TonySterling
Moderator
Moderator
Partner    VIP    Accredited Certified

What would be NULL?  If the archive is deleted what are you going to link on?

AndrewB
Moderator
Moderator
Partner    VIP    Accredited

why are you trying to solve this with sql instead of the index management tools themselves?

Scott__Hastings
Level 5
Partner Accredited Certified

Andrew, I just thinkSQL would be much faster. Tony, the archive hasn't been deleted, I just think someone made copies of Indexes that are no longer associated with archives. 

Scott D Hastings Sr

TonySterling
Moderator
Moderator
Partner    VIP    Accredited Certified

Thanks for that Scott, so are you wanting to match them by location?  If they are in the same location you could check the Index Volume Path to see if that location is in the EV db.

End of the day, if you think they are copies just taking up space you could delete them.  If they are needed they will be rebuilt.  What is the scale of the issue?  Is it just a few?  If it is hundreds just deleting may require some more indepth investigation to be positive they are copies rather than just nuking them.  :)

Scott__Hastings
Level 5
Partner Accredited Certified

Tony, I think it's in the 100's, so I need to do some indeth investivation. 

 

I suppose I was if the same mind as Jimmy.... that orphaned indexes would return NULL as an archive...

Scott D Hastings Sr

TonySterling
Moderator
Moderator
Partner    VIP    Accredited Certified

If someone made copies of an index then there is an original that is accounted for in the db.  EV won't know about the copy.

 

 

Scott__Hastings
Level 5
Partner Accredited Certified

Makes perfect sense Tony......

Scott D Hastings Sr