New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Captain Captain
Captain
624 views

Purge old scans from WebInspect database

Jump to solution

So I ran a query on my WebInspect database and see that I have a LOT of scan data in the db for a lot of scans that were deleted from the WebInspect Enterprise GUI.

ScanState     count
3                        1807
4                           463
5                             84
9                                6
18                        127
23                    15692

Currently, I have 1344 scans in my WebInspect Enterprise console. According to the numbers above, there are 15,692 scans in the db that failed to archive, and 127 that are "deleting".

How can I purge all of the info for these orphan scans from the database and reclaim the space?

I know that I can run DELETE FROM Scan WHERE ScanID='Specific ScanID', but this doesn't delete all remnants of the scan and free up the space in the database.

@ebell @HansEnders 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Tech Support has a script that can be run against the database. Please open a ticket with them and mention KB article KM03333951

 

 

View solution in original post

7 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Tech Support has a script that can be run against the database. Please open a ticket with them and mention KB article KM03333951

 

 

View solution in original post

Highlighted
Captain Captain
Captain

Is there a way that this query can be modified to delete scans that are in a specific scan state (i.e. scan state 4).

Would this work?

DECLARE ScansToDelete CURSOR for 
	SELECT ScanID FROM Scan WHERE ScanState = 4 
OPEN ScansToDelete 

 @ebell 

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Sounds reasonable; however, I would:

  1. Make sure you have a backup of your database
  2. Test in non-production first
  3. Include the rest of the initial script. 🙂
0 Likes
Highlighted
Captain Captain
Captain

Just for anyone else who may have the same question:

substituting the ScanState in place of the date does work. I was able to purge some scans that were stuck in ScanState 18 using it.

Highlighted
Lieutenant Commander Lieutenant Commander
Lieutenant Commander

@ebell Is it possible to get a list of all of the Scan States and their values?

Thanks!

0 Likes
Highlighted
Lieutenant Commander Lieutenant Commander
Lieutenant Commander

Perfect! Thank you!

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.