Quantcast
Channel: Quality Center / ALM Practitioners Forum topics
Viewing all articles
Browse latest Browse all 5491

How to: Find Idle Projects

$
0
0

Issue: In a medium to large QC/ALM environment, how to find projects that are Activated, but not in actual use.  The application allows you to check each project "by hand" in site analysis, but this is tedious if you need to do it for more than 2-3 projects.

 

This example SQL will return the projects that are marked active, but have had no user log-ins since 1 June, 2014.  Simply change the date to satisfy your needs.  Remove the closing AND clause if you want to see already deactivated projects as well.

 

Select * from QCSITEADMIN_DB.PROJECTS
WHERE NOT EXISTS (
  Select NULL
  From QCSITEADMIN_DB.SESSIONS_HISTORY
  WHERE QCSITEADMIN_DB.SESSIONS_HISTORY.PROJECT_NAME = QCSITEADMIN_DB.PROJECTS.PROJECT_NAME
  AND QCSITEADMIN_DB.SESSIONS_HISTORY.END_TIME > '01-JUN-14'
  ) AND QCSITEADMIN_DB.PROJECTS.PR_IS_ACTIVE = 'Y'

 

 

To Deactivate the projects, run again as

DANGER, DANGER, DANGER: Make sure you really mean to do this.  It's easy to reverse, but you have the potential to really annoy and disrupt your users with this.

 

UPDATE QCSITEADMIN_DB.PROJECTS
SET PR_IS_ACTIVE = 'N'

WHERE NOT EXISTS (
  Select NULL
  From QCSITEADMIN_DB.SESSIONS_HISTORY
  WHERE QCSITEADMIN_DB.SESSIONS_HISTORY.PROJECT_NAME = QCSITEADMIN_DB.PROJECTS.PROJECT_NAME
  AND QCSITEADMIN_DB.SESSIONS_HISTORY.END_TIME > '01-JUN-14'
  ) AND QCSITEADMIN_DB.PROJECTS.PR_IS_ACTIVE = 'Y'

 


Viewing all articles
Browse latest Browse all 5491

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>