Procedure to ensure a host is completely deleted from VAIM

Document ID : KB000046943
Last Modified Date : 14/02/2018
Show Technical Document Details

Summary:

VAIM uses a combination of database and flat configuration files to track endpoints running SystemEDGE.   The following procedure ensures all remnants of a host are completely removed from VAIM after a delete operation.

Instructions:

Procedure to be run from the VAIM Domain manager after deleting the host from the VAIM UI.

1. Copy and paste the "delete.sql" command syntax under "Additional Info".

2. Make note of the hostnames that are displaying within Policy that should be removed. Note the hostname exactly as it appears within UI (hostname vs HOSTNAME vs hostname.fqdn.com, etc)

3. Stop the "CA SM Distribution Server" and "CA SM Domain Server" services.

4. Open "C:\ProgramData\CA\SM\domainserver\Objects\sysEDGE.dat" in a text editor that can properly handle UNIX format (NOT notepad - use Wordpad,Notepad++, UltraEdit, etc).

5. Find the line with the target system to be removed within the sysEDGE.dat and delete the entire line. If deleting multiple hosts, repeat as necessary.

6. Modify the "delete.sql" downloaded from step 1 - find the "delhost.ca.com" string (less the quotes) and replace it with your target hostname as found/noted in step 2.

If deleting multiple hosts, copy the original line, and paste it on the next line (don't skip any lines) and modify the delhost.ca.com section accordingly and repeat as necessary. A snippet of the section will look like this:

where tgt_name='delhost.ca.com' AND tgt_id=jtr_tgt_id

                ^^^^^^^^^^^^^^

Once the file is modified accordingly, save it.

7. Run the query from a command prompt:

"C:\Program Files (x86)\SQLite ODBC Driver\sqlite3.exe" "C:\ProgramData\CA\SM\domainserver\data\audit.dat" < c:\delete.sql

8. Do a find in the "C:\ProgramData\CA\SM" directory for all files that begin with the hostname that was deleted (using the example from step 6 search for "delhost")

9. Delete ALL files (mix of {hostname}.cf, {hostname}.tmp, {hostname}.cmp,{hostname}.err, etc).

10. Start the "CA SM Domain Server" and "CA SM Distribution Server" services.

 

Additional Info:

delete.sql

delete from job_target_records where jtr_id IN ( select jtr_id from job_target_records, targets, job_configs, configs where tgt_name='delhost.ca.com' AND tgt_id=jtr_tgt_id AND jtr_jcv_id=jcv_id AND jcv_cfg_id=cfg_id AND cfg_description='sysEDGE');