Find ProjectID
In many of the troubleshooting and remediation queries, you may wish to limit the results to targets from a specific project. In the UI you typically browse into the project and then into the diagnostics screen. When querying the database directly, if you do not filter by project you will see results from ALL POSSIBLE projects, current and past.
SELECT p.ProjectID, p.Name, p.LastScannedAt, ps.Name as ProjectState FROM config.t_Project p INNER JOIN config.t_ProjectState ps ON p.ProjectStateID = ps.ProjectStateID
The results of this query should be a table like this:
ProjectID | Name | LastScannedAt | ProjectState |
---|---|---|---|
1 | TestProject | 2018-01-01 10:54:00.000 | Deleted |
2 | Lan01 | 2018-02-01 09:02:00.00 | Running |
3 | DataCenter | 2018-02-03 11:32:00.00 | Paused |
The ProjectID is the key, a unique number that identifies the project; This is the value we will use to plug in to other queries to filter by project.
The Name column is the name by which the project is identified in the UI
The LastScannedAt column shows the date/time at which the a scan of this project was last started.
The ProjectState column shows whether the project is active ("running" does not mean currently scanning, but available to run), paused (not able to run currently, but can be re-enabled) or disabled (Deleted means hidden from the UI, Completed means can no longer run but the results are still availbale)