List of solutions

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
CityOfOrlando
Posts: 24
Joined: Tue Aug 01, 2006 2:18 pm
Contact:

List of solutions

Post by CityOfOrlando » Wed Oct 25, 2006 1:25 pm

Can someone provide me with a SQL statement to retrieve a list of all the solutions in SourceGear vault?

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Wed Oct 25, 2006 2:41 pm

Do you mean a list of the VS solution files?
Or list of project files?
Or list of folders?

I want to make sure we are both thinking the same thing.

CityOfOrlando
Posts: 24
Joined: Tue Aug 01, 2006 2:18 pm
Contact:

Post by CityOfOrlando » Wed Oct 25, 2006 2:55 pm

Solution files or Project Files. Actually, it would be nice to know how to query for any specific file type. Right now, I need to report to management how many projects are in SourceGear.

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Oct 25, 2006 3:08 pm

There is no real tree on the Vault server so a query is not really practical.

The easiest way to get this would be through the Vault client. Have you tried a filename search within the Vault client for *.sln, *.vbproj, or *.csproj? You can find this functionality on the Vault GUI Client's Search tab.
Jeff Clausius
SourceGear

CityOfOrlando
Posts: 24
Joined: Tue Aug 01, 2006 2:18 pm
Contact:

Post by CityOfOrlando » Wed Oct 25, 2006 3:17 pm

That works, however I have to go into each repository individually and then tally the results myself.

Slightly off topic, I can find everything checked out across all repositories by using the following:

SELECT * FROM sgvault.dbo.tblcheckoutlistitems WHERE colistid In
(SELECT currentcolistid FROM sgvault.dbo.tblrepositories)

I thought maybe someone might be able to point me in the direction of finding all files of a type across all repositories.

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Oct 25, 2006 3:27 pm

I didn't think about the checkout list.

This is not really practical, and would be more of a pain than searching from the client, but if you checked out all project files across all repositories, and then query the checkout list table that would be one way to do it from a SQL point of view.
Jeff Clausius
SourceGear

jclausius
Posts: 3702
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Oct 25, 2006 3:35 pm

Another option:

You could use a cursor that retrieves every repository's id. Then using the repid and the SQL code from this post -

http://support.sourcegear.com/viewtopic ... c&start=30

build a tree and place it into a temp table. Then from the temp table query for the files you are looking for.
Jeff Clausius
SourceGear

Locked