Video Screencast Help
Symantec Appoints Michael A. Brown CEO. Learn more.

Delete Computer ID from Database

Created: 18 Nov 2012 | 2 comments

Hi I am looking for an sql query that I can run through a script from DS6.9 when imaging a computer to remove it from the Symantec_cmdb database. I am looking for the same as going to Manage - Computers - delete. We are currently using NS Version 7.1.8400.

I think I would need to search on the serial number of the computer, as the name and/or Ip may change.

this is to eliminate computers getting previously deployed applications.

Thanks in advance, Cat 

Comments 2 CommentsJump to latest comment

b3tts32's picture

So you're wanting reimage a machine and delete it from the NS before hand so it doesn't get the same applications? Would software detection rules with your software deliviery policies not prevent that? Sorry I'm just trying to understand what exactly you're trying to do. We have a similar setup and do a lot of imaging but don't remove anything prior.

 

Anywhoo.. getting to your question. There's actually a NS_GUID column in the Express database (computer table)that would save you from searching by serialnumber. If you want to run a stored procedure from the DS you could reference that with a custom token %#!computer@ns_guid%. I'm sure there's a stored procedure in the Symantec_CMDB that deletes the computer.. it's just a matter of finding it and passingn the appropriate parameters. Though you would need to setup a custom data source and what not to do all of that. Here's a good article about running stored procedures from the DS that's really helped me. The info aboutu stored procedures is toward the end.

 

https://www-secure.symantec.com/connect/articles/l...

 

 

cathossie's picture

Hi b3tts32 yes you're first line is correct. We don't want a reimaged computer to get the same apps or tasks it may have had pre imaging. We do have our software policies check for compliancy etc, but if a computer is reimaged it will do the compliancy check and install the application when not found. Ie: Acrobat 10 reader is in our base image and then some users have a licence for Acrobat 10 professional. The user moves to a different location there old computer stays at the old location - we reimage and the old computer gets acrobat 10 professional when it should only have reader.

Hope this makes sense as an organisation with 8000 computers it is best to remove a computer from all filters tasks etc and start fresh, we do not give our support staff in the field access to delete a computer from the NS. They only have access to remove computers from individual filters and sometimes forget to ring a level 3 tech to remove from the NS. Was hoping to automate this all from DS6.9

Thanks for the tip re the NS_guid - now to write a query that works!!!

Cat