Highlighted
Absent Member.
Absent Member.
2507 views

SQL query to find dates when QC projects were last accessed by users

Sharing query I just wrote to pull domains, projects, and last time a user logged in to those projects (to help admins with cleanup process). Query needs to be run against site admin database (SQL Server)

 

SELECT [DOMAIN_NAME], [PROJECT_NAME], max([END_TIME]) [END_TIME]
      
FROM [qcsiteadmin_db0].[td].[SESSIONS_HISTORY]

Group By [DOMAIN_NAME],[PROJECT_NAME]
Order By [END_TIME] asc

Tags (1)
2 Replies
Highlighted
Fleet Admiral
Fleet Admiral

Thank you!!!

 

Ciao,

Massimo.

0 Likes
Highlighted
Cadet 1st Class
Cadet 1st Class

Suggest to filter out _system_user_ from the results to see exact last login datetime.

And thank you for the query

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.