Hello, we are working with Vault in a J2EE shop. Our development environment is directly tied to Vault with Shadow Folders. We are trying to come up with a scheme to create nightly builds to our Test and Production environments based on versioning or other status information in Vault.
My question is: would there be any way to use SQL or DTS to query the Vault database for the names and locations of files that match a certain version # or have certain text in an attribute?
This way, the DTS script could create a text file listing all of the files that needed to be copied over to Test and production.
Querying SQL database for builds
Moderator: SourceGear
This might be rather difficult to do. It can be done, but the success depends on your knowledge of the schema and SQL Server itself.would there be any way to use SQL or DTS to query the Vault database for the names and locations of files that match a certain version # or have certain text in an attribute?
Look at the results from :
SELECT * FROM sgvault.dbo.ufngettreestructure( @@SOME_REPID, -1 ) ORDER BY treelevel, parentpathhash
This will give you the current tree for a given repository id (from tblrepositories). If you want to find how the tree looked yesterday, you could issue the same select statement from above, but use an actual transaction id from yesterday instead of -1.
Note the full paths to items are not stored, so you would have to iterate of the result set, concatenating parent to child ( joining on treelevel = treelevel + 1 and fullpathhash = parentpathhash )
You could search the results from this query to find what you are looking for.
Jeff Clausius
SourceGear
SourceGear