cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Query to list "Bill Usage to" option

Rajesh_Velaga1
Level 4

SQL Query to list "Bill Usage to" option

1 ACCEPTED SOLUTION

Accepted Solutions

JesusWept3
Level 6
Partner Accredited Certified

SELECT A.ArchiveName "Archive Name", T.SID "Billing Owner"
FROM Archive A, Root R, Trustee T
WHERE A.RootIdentity = R.RootIdentity
AND R.OwningTrusteeIdentity = T.TrusteeIdentity

The problem you will have is that EV stores the SID and not the AD Account name, it then dos a SID lookup in AD to populate information in the VAC.

You could use Linked Servers to bridge to AD and do a SID lookup from there i believe

https://www.linkedin.com/in/alex-allen-turl-07370146

View solution in original post

3 REPLIES 3

JesusWept3
Level 6
Partner Accredited Certified

SELECT A.ArchiveName "Archive Name", T.SID "Billing Owner"
FROM Archive A, Root R, Trustee T
WHERE A.RootIdentity = R.RootIdentity
AND R.OwningTrusteeIdentity = T.TrusteeIdentity

The problem you will have is that EV stores the SID and not the AD Account name, it then dos a SID lookup in AD to populate information in the VAC.

You could use Linked Servers to bridge to AD and do a SID lookup from there i believe

https://www.linkedin.com/in/alex-allen-turl-07370146

Rajesh_Velaga1
Level 4

We wanted to automate EV Archive deletions, We will manually delete EV archives
if billing usage field is "unknown" (Users deleted from AD). Is that possible to
find out EV archives associated to deleted AD users using SQL query?

jprknight-oldax
Level 6

JW2 you have done it again!

I already have a vbscript to lookup the AD name from the SID so combining this with your SQL query above I can create another kick ass page in EVDashboard.

I was only searching for anything on the forums which happened to mentioned which table contained the 'bill usage to' field!

Love your work!

Jeremy.