Deleting Workstations from ZENworks Inventory when they're not in eDirectory
Novell Cool Solutions: Trench
By Victor Coscodan
|
Digg This -
Slashdot This
Posted: 24 Feb 2005 |
PROBLEM: How to delete a workstation from the ZENworks database, if it's not present in eDirectory (NDS), but it exists in an inventory report.
Solution
- First of all, you need the NDS name of this workstation. (You can receive from the report, but I think you know it without report.)
For ZfD4 and later in format CN=WSNAME.OU=UNIT.O=ORG.T=TREE ,
for other ZfD - WSNAME.UNIT.ORG - Install and configure ODBC drivers for ZfD database (for example ?Sybase ODBC Driver?).
- Use any SQL explorer. I use one from Borland C++Builder. Open database.
- Execute SQL command:
- For ZfD4 and later:
select string(id$)
from CIM.UnitaryComputerSystem
where Name = 'wsname'
- For other ZfD:
select string(id$), *
from ManageWise.NDSName
where Label = 'wsname' - You will receive a number. Use this number for next SQL command:
- For ZfD4 and later:
delete from CIM.t$ManagedSystemElement
where id$= 'number'
- For other ZfD:
delete from ManageWise.t$NDSName
where id$= 'number' - Close database. You can verify.
Examples
4.
select string(id$)
from CIM.UnitaryComputerSystem
where Name = 'CN=WSNAME.OU=WS.O=ORG.T=TREE'
5.
delete from CIM.t$ManagedSystemElement
where id$= 57139420272263536
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

