76.8 Removing Duplicate Workstation Objects from the Inventory Database

You can now remove the duplicate workstation objects from the Inventory database by using the Dupremove utility.

Duplicate workstation objects are workstations that have multiple entries in the Inventory database. If the Inventory database has duplicate workstation objects, it not only results in wasted database space but also reporting of duplicate information by the Inventory ConsoleOne utilities such as Query, Summary, Inventory Reports, and Data Exports.

The following sections provide more information on how to use the Dupremove utility:

76.8.1 Running the Dupremove Utility

  1. Stop the Inventory service. For more information, see Section 73.1.5, Starting and Stopping the Inventory Service.

  2. Make sure that the Database server is up and running.

  3. Run the Dupremove utility.

    • On a NetWare Inventory server:

      Edit sys:\system\dupremove.ncf to configure the required parameters. Refer to dupremove.ncf for information about configuring the parameters. For detailed information about the parameters, see Section 76.8.2, Understanding the Dupremove Switches.

      After editing the file, go to sys:\system and enter dupremove from the Inventory server system console prompt.

    • On a Windows Inventory server:

      Edit Inventory_server_installation_directory\zenworks\inv\server\wminv\bin\dupremove.bat to configure the required parameters. Refer to dupremove.bat for information about configuring the parameters. For detailed information about the parameters, see Section 76.8.2, Understanding the Dupremove Switches.

      After editing the file, go to Inventory_server_installation_directory\zenworks\inv\server\wminv\bin and enter dupremove from the Inventory server command prompt.

    • On a Linux Inventory server:

      Edit /opt/novell/bin/dupremove to configure the required parameters. Refer to dupremove for information about configuring the parameters. For detailed information about the parameters, see Section 76.8.2, Understanding the Dupremove Switches.

      After editing the file, go to /opt/novell/bin and enter ./dupremove from the Inventory server command prompt.

    IMPORTANT:You must enclose the parameters within double quotes in dupremove.ncf, dupremove.bat or dupremove files, and there should be no spaces within double quotes. For example, “-dbtype=1”.

    If you specify wrong parameters, or spaces within double quotes, the Dupremove utility retries endlessly.

    To stop this process on a NetWare Inventory server, you must first procure the process ID of the Dupremove utility by entering java -show at the server prompt, and then enter java -killDupremove_process_ID.

    To stop the process on a Windows or Linux Inventory server, press Ctrl+C.

  4. Start the Inventory service. For more information, see Section 73.1.5, Starting and Stopping the Inventory Service.

  5. Enforce a full scan either on all affected workstation objects or on all workstation objects that send the inventory data to this Inventory server:

    • To enforce a full scan on all workstation objects that send the inventory data to this Inventory server, enforce a full scan on the Inventory Service object. For more information, see Section 73.3, Configuring the Inventory Service Object.

    • To enforce a full scan on an affected workstation object:

    1. In ConsoleOne, right-click the workstation object, then click Properties.

    2. Click the ZENworks Inventory tab, then click the Workstation Scan Configuration suboption.

    3. Select Start Full Scan.

    4. Click Apply, then click Close.

    5. Repeat Step 5.a through Step 5.d for all affected workstation objects.

76.8.2 Understanding the Dupremove Switches

-host

Specify the IP address of the server on which the Inventory database is running.

-dbtype

The Inventory database type. It can include any of the following values:

Table 76-2 List of Dbtype values

Inventory Database Running On

Dbtype Value

Sybase

0

Oracle

1

MS SQL

2

-sid

The service ID identifying the Inventory database. -sid is required to connect to JDBC. It can include any of the following values:

Table 76-3 Sample sid values

Inventory Database Running On

Sample SID Values

Sybase

mgmtdb

Oracle

orcl

MS SQL

mgmtdb

-port

The port number on which the Inventory database is running. It can include any of the following values:

Table 76-4 Sample port values

Inventory Database Running On

Sample Port Values

Sybase

2638

Oracle

1521

MS SQL

1433

Dupremove Functions

You must use the following Dupremove functions only one at a time in the dupremove.bat, dupremove.ncf, or dupremove:

IMPORTANT:The values for the Dupremove functions are case-sensitive.

Table 76-5 Detail explanation and examples of the Dupremove functions

Dupremove Switch

Description

Possible Values / Pattern Types

Examples

-listwsdup

Lists all workstations that have duplicate entries in the Inventory database.

---

To list all the workstation objects that have duplicate entries in the Sybase Inventory database, edit the Java command in dupremove.bat, dupremove.ncf, or dupremove as follows:

java -Djava.compiler= com.novell.zenworks.desktop.inventory.storer.DatabaseOperator "-host=127.0.0.1" "-listwsdup" "-dbtype=0" "-sid=mgmtdb" "-port=2638"

-listwsdirty

Lists all workstations whose scan data has not been updated in the Inventory database and that need a full scan.

--

To list all the workstation objects that have duplicate entries in the Oracle Inventory database, edit the Java command in dupremove.bat, dupremove.ncf, or dupremove as follows:

java -Djava.compiler= com.novell.zenworks.desktop.inventory.storer.DatabaseOperator "-host=127.0.0.1" "-listwsdirty" "-dbtype=1" "-sid=orcl" "-port=1521"

-listwspattern

Lists workstation objects on the basis of the pattern you define.

  • Workstation names beginning with with a specific character or a string

  • Workstation names containing a specific character or a string

  • Workstation names ending with a specific character or a string

IMPORTANT:You must enter the typed DN of the workstation.

  • To list all the workstation objects whose DN starts with “cn=ws” and that have duplicate entries in the Sybase Inventory database, edit the Java command in dupremove.bat, dupremove.ncf, or dupremove as follows:

    java -Djava.compiler= com.novell.zenworks.desktop.inventory.storer.DatabaseOperator"-host=127.0.0.1”"-listwspattern=cn=ws%%""-dbtype=0" "-sid=mgmtdb" "-port=2638"

  • To list all the workstation objects whose DN contains “ou=novell” and that have duplicate entries in the Oracle Inventory database, edit the Java command in dupremove.bat, dupremove.ncf, or dupremove as follows:

    java -Djava.compiler= com.novell.zenworks.desktop.inventory.storer.DatabaseOperator"-host=127.0.0.1""-listwspattern=%%ou=novell%%""-dbtype=1" "-sid=orcl" "-port=1521"

  • To list all the workstation objects whose DN ends with “T=novell_inc” and that have duplicate entries in the MS SQL Inventory database, edit the Java command in dupremove.bat, dupremove.ncf, or dupremove as follows:

    java -Djava.compiler= com.novell.zenworks.desktop.inventory.storer.DatabaseOperator"-host=127.0.0.1""-listwspattern=%%T=novell_inc""-dbtype=2" "sid=mgmtdb" "-port=1433"

-remwsdup

Removes workstation objects from the Inventory database.

  • * (asterisk): Removes inventory information from all the workstation objects having duplicate entries in the database

  • Typed_DN_of_a_workstation: Removes inventory information of the specific workstation object having duplicate entries in the database

  • To remove all information from all workstation objects having duplicate entries in the MS SQL Inventory database, edit the Java command in dupremove.bat, dupremove.ncf, or dupremove as follows:

    java -Djava.compiler= com.novell.zenworks.desktop.inventory.storer.DatabaseOperator"-host=127.0.0.1" "-remwsdup=*""-dbtype=2" "-sid=mgmtdb" "-port=1433"

  • To remove all information from one workstation object having a duplicate entry in the Oracle Inventory database, edit the Java command in dupremove.bat, dupremove.ncf, or dupremove as follows:

    java -Djava.compiler= com.novell.zenworks.desktop.inventory.storer.DatabaseOperator"-host=127.0.0.1""-remwsdup=ws.novell.novell_inc""-dbtype=1" "-sid=orcl" "-port=1521"

-remwspattern

Removes workstation objects on the basis of the pattern you define.

  • Workstation names beginning with with a specific character or a string

  • Workstation names containing a specific character or a string

  • Workstation names ending with a specific character or a string

IMPORTANT:You must enter the typed DN of the workstation.

  • To remove all the workstation objects whose DN starts with “cn=ws” and that have duplicate entries in the Sybase Inventory database, edit the Java command in dupremove.bat, dupremove.ncf, or dupremove as follows:

    java -Djava.compiler= com.novell.zenworks.desktop.inventory.storer.DatabaseOperator"-host=127.0.0.1""-remwspattern=cn=ws%%""-dbtype=0" "-sid=mgmtdb" "-port=2638"

  • To remove all the workstation objects whose DN contains “ou=novell” and that have duplicate entries in the Oracle Inventory database, edit the Java command in dupremove.bat, dupremove.ncf, or dupremove as follows:

    java -Djava.compiler= com.novell.zenworks.desktop.inventory.storer.DatabaseOperator"-host=127.0.0.1""-remwspattern=%%ou=novell%%""-dbtype=1" "sid=orcl" "-port=1521"

  • To remove all the workstation objects whose DN ends with “T=novell_inc” and that have duplicate entries in the MS SQL Inventory database, edit the Java command in dupremove.bat, dupremove.ncf, or dupremove as follows:

    java -Djava.compiler= com.novell.zenworks.desktop.inventory.storer.DatabaseOperator"-host=127.0.0.1""-remwspattern=%%T=novell_inc%%""-dbtype=2" "-sid=mgmtdb" "-port=1433"

-remwsfile

Removes the workstation objects whose names are listed in a file.

Complete path of the file including the filename

  • To remove all the workstation objects that have duplicate entries in the MS SQL Inventory database and are listed in c:\windows\wsname.txt:

    java -Djava.compiler= com.novell.zenworks.desktop.inventory.storer.DatabaseOperator"-host=127.0.0.1""-remwsfile=c:\\windows\\wsname.txt" "-dbtype=2" "-sid=mgmtdb""-port=1433"

The contents of c:\windows\wsname.txt are as follows:

CN=a.OU=b.O=c.T=Novell_inc
CN=ws.OU=novell.T=novell_inc
WS1.novell.novell_inc
WS2.novell.novell_inc

-user

Provide the user name only if you have not logged into the Inventory database as the default user (mw_dba).

-password

Provide the password for the user specified in the “-user” switch.