Is it possible to generate a list of all the locked files in the StarTeam database?

0 Likes

Problem:

Is it possible to generate a list of all the locked files in the StarTeam database?

Resolution:


  • Product Name: StarTeam
  • Product Version: ALL
  • Product Component: Database
  • Platform/OS Version: N/A


Yes, this can be done by querying the StarTeam database using custom SQL code. The code below will output all Locked files in the StarTeam database:

SELECT * FROM syn_file WHERE id IN
( SELECT id FROM syn_file WHERE rootobjectid in
( SELECT DISTINCT(rootobjectid) FROM syn_viewmember WHERE id IN
( SELECT itemvmid FROM syn_itemlock ) ) GROUP BY id ) AND endmodifiedtime = 0

The code above could be saved as a SQL file and executed from a batch file.
The following command from a batch file will execute the SQL and output to text file.

osql -U sa -P StarTeam123 -S .\SSE2005_ST -d starteam_stardraw100_db -n -i locked_files.sql > Report.txt

In order for this to be run , you need to do the following:

  1. Change the U to your username
  2. Change the P to your password
  3. Change the S to your server
  4. Change the D to your DB name as per SQL or Oracle
  5. Change the i to the name of the file you have for the custom SQL above


Old KB# 29127
Comment List
Related
Recommended