Novell Home

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

  1. 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
  2. Install and configure ODBC drivers for ZfD database (for example ?Sybase ODBC Driver?).


  3. Use any SQL explorer. I use one from Borland C++Builder. Open database.


  4. 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'


  5. 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'
  6. 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

© 2014 Novell