- 1 OpenStack Open Infrastructure Pilot Projects from A to Z
- 2 U.S. Supercomputers Lead Latest Top500 Performance Ranking
- 3 Dell EMC Enhances VxBlock, VxRail Hyperconverged Infrastructure
- 4 AMD Details Data Center Server Silicon Innovation at Next Horizon
- 5 VMware vSphere 6.7 Arrives with Stability and Security Enhancements
Cleaning Up Your SMS Database with DelGrp
Deleting tables without deleting all the pieces of the group can cause problems with dependencies, not to mention lots of errors.
The Delete Group Class Tool (DelGrp.exe) is used to delete group classes and their tables.
"Real World" Application
I can think of a few examples when this may become necessary. First, let's say you decide to evaluate certain Altiris products. Or, maybe Inventory solution or Software Delivery Solution are configured to insert data into the SMS database. Dell OpenManage Client can also cause new database objects to appear if you configure it to send a NOIDMIF.
If you have multiple versions you will have many tables, some with numbers appended to the end, like 001, or 003. If you have used both of these products there could possibly be over 200 tables and stored procedures. Now you've got a real mess that you need to clean up.
Before attempting to remove these tables be sure you have a recent backup and try it in a test lab. Losing your SMS database can really ruin your day.
Before you can use the Delete Group Class tool, you must first obtain the proper name of the group that you want to delete. You can obtain a list of group classes by running the following query in SQL:
Select GroupClass From GroupMap
After you have determined the group you want to delete, run this command:
*Note - delgrp.exe must be copied to the Primary Site Server where you want to modify the database and the quotations must be used.
If you have 100's of groups to delete this could get quite monotonous. I exported the list of groups from the SQL Query Analyzer and placed them in a batch file. It worked much better. I copied delgrp.exe into the same directory as these batch files (on the a site sever).
Here is a portion of the batch code that I used to remove the Dell Groups:
%0\..\delgrp.exe "DellDMTF|WIN32 DMI SERVICE LAYER|001"
%0\..\delgrp.exe "DellINTEL|SERVICE LAYER CHARACTERISTICS|001"
%0\..\delgrp.exe "DellINTEL|SERVICE LAYER SECURITY|001"
%0\..\delgrp.exe "DellDMTF|SP INDICATION SUBSCRIPTION|001"
%0\..\delgrp.exe "DellDMTF|AUTHENTICATION PROTOCOLS|001"
%0\..\delgrp.exe "DellDMTF|SP CHARACTERISTICS|001"
%0\..\delgrp.exe "DellDMTF|SERIAL PORTS|003"
%0\..\delgrp.exe "DellDMTF|PHYSICAL CONTAINER GLOBAL TABLE|002"
%0\..\delgrp.exe "DellDMTF|SYSTEM SLOTS|003"
%0\..\delgrp.exe "DellDMTF|VIDEO BIOS|001"
Here is a portion of the batch code that I used to remove the Altiris Groups:
After you run DelGrp to delete the desired groups, using SQL Enterprise Manager delete any related stored procedures using this Q article. You will find 2 stored procedures for each table that you deleted.
The more preferred method of extending hardware inventory is to edit the SMS_def.mof file. Allowing 3rd party vendors to create a NOIDMIF file can cause unexpected results. It can be difficult and time consuming to clean up. The sms_def.mof is a database that the SMS client works through to access WMI. WMI is an industry standard. It is a more stable path to follow.
To learn more about WMI and extending your hardware inventory, take a look at the WMI SDK at http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?url=/msdn-files/027/001/566/msdncompositedoc.xml
Also, pick up Marcin Policht's book "WMI Essentials for Windows Management" for more information on WMI.
IT Solutions Builder TOP IT RESOURCES TO MOVE YOUR BUSINESS FORWARD
Which topic are you interested in?
What is your company size?
What is your job title?
What is your job function?
Searching our resource database to find your matches...