Create a list of Active Vault users to a CSV or text file

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
kryan762
Posts: 2
Joined: Tue Nov 07, 2006 4:21 pm

Create a list of Active Vault users to a CSV or text file

Post by kryan762 » Tue Nov 07, 2006 4:25 pm

I need to create on a regular basis a list of active vault users .

What are my options ?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Tue Nov 07, 2006 5:35 pm

Run this query against the Vault database:

use sgvault
go
select * from tblusers where Active=1
go

If you're using Query Analyzer, you can save the results by selecting File->Save As in Query Analyzer. The results will be saved in a .csv file.
Linda Bauer
SourceGear
Technical Support Manager

kryan762
Posts: 2
Joined: Tue Nov 07, 2006 4:21 pm

Thanks Linda

Post by kryan762 » Thu Nov 09, 2006 9:24 am

On similar topic can I create a list of users by group membership ?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Fri Nov 10, 2006 3:39 pm

Try this:

SELECT u.login, g.name FROM
sgvault.dbo.tblusers u
INNER JOIN sgvault.dbo.tblgroupmembers gm ON (gm.userid = u.userid)
INNER JOIN sgvault.dbo.tblgroups g ON g.groupid = gm.groupid
ORDER BY u.login, g.name
Linda Bauer
SourceGear
Technical Support Manager

Post Reply