Novell Home

Creating ZfD 3 Inventory Database on Oracle 8i (Unix)

Novell Cool Solutions: Feature
By Krishnan R

Digg This - Slashdot This

Posted: 2 May 2001
 

Version: ZENworks for Desktops 3

Editor's Note: We originally published this with an error in the last system requirement. The correct minimum RAM requirement is now listed. We apologize for any confusion this caused!

This article discusses how to create the Inventory database on Oracle 8i on UNIX servers.

In ZENworks for Desktops 3, Inventory database on Oracle is supported on NetWare and Windows NT/2000. This solution can be used to mount ZfD 3 Inventory database on Oracle 8i running on any UNIX operating system. If you have Oracle 8i on Solaris or Linux, you can use the ready-made Inventory database for these platforms.

This solution is recommended if you have Oracle 8i on UNIX.

System Requirements

Before you start, ensure that the following configuration is available:

  • Oracle 8i (8.1.5 or above) Enterprise edition on a UNIX server.
  • You have Oracle database administrator rights.
  • Minimum of 500 MB-1 GB free disk space.
    (If the Inventory database is on the Root Server, recommended free disk space is 5-10 GB.)
  • Minimum 256 MB RAM (512 MB RAM recommended for Root Server)

Procedures

Creating the Inventory Database

Follow these steps:

  1. Login as an Oracle administrator.
  2. Create a directory named ZfD3 in the home directory.
  3. Create a directory named scripts in the ZfD3 directory.
  4. Download InvOracle8iUNIXScripts.tar into the scripts directory.
  5. Type these commands to extract the scripts:

    $ tar -xvf InvOracle8iUNIXScripts.tar

    The Inventory database schema creation scripts are extracted into the scripts directory.

    The following files are extracted:

    _create.sql

    _start.sql

    DelProc.sql

    init.ora

    schema.sql

    _dbinit.sql

    AlterCtrl.sql

    enums.sql

    lock.sql

    ZENworks.sql

    _prolog.sql

    CIM.sql

    grant.sql

    ManWise.sql

       
  6. Create the following sub-directories:

    ZfD3/zenworks
    ZfD3/zenworks/database
    ZfD3/zenworks/database/trace
  7. 6.1 Copy the file init.ora from the scripts directory to ZfD3/zenworks/database directory.

  8. Edit the file init.ora.
    Specify the Oracle version that you use in the following line:

    optimizer_features_enable=
    Save the file.
  9. Run the Oracle Server Manager.

    Type: $ svrmgrl

    8.1. Connect as Oracle Internal user.
    At the Oracle Server Manager prompt, type:

    connect internal/<password>
    where <password> is the password of the Oracle Internal user.

  10. If you have created a separate Oracle instance for ZfD3 Inventory database, switch to that instance.
    At the Oracle Server Manager, type:

    set instance <Oracle instance name>

    Otherwise, shut down any existing databases.
    At the Oracle Server Manager, type:

    shutdown normal

  11. At the Oracle Server Manager prompt, type:

    @$HOME/ZfD3/scripts/schema.sql

    Displays database creation messages that implies the Inventory database creation is in progress. Wait until the process is completed.

    To ensure the database creation is proceeding without errors, check the following error messages on screen:
    "Oracle not available", "Out of memory", "Error"...

    If these messages are displayed, stop the Oracle Server Manager, and repeat from Step 1.

    Alternatively, wait until the process is completed. The messages are logged in $HOME/inv.log file. Look up this file and check for any error messages and repeat from Step 1 if required.

  12. On completion of the schema creation process, check for availability of the following files in ZfD3/zenworks/database directory:

    cim1.ora

    cim2.ora

    cim3.ora

    cim4.ora

    cim5.ora

    cim6.ora

    cim7.ora

    cim8.ora

    cim9.ora

    Ctl1.ora

    init.ora

    Log1.ora

    Log2.ora

    Rbs1.ora

    Sys1.ora

    Tmp1.ora

  13. Copy the files: _start.sql, _dbinit.sql, AlterCtrl.sql from the scripts directory to the zenworks directory.
  14. Archive the directory $HOME/ZfD3/zenworks to recover from any possible failures.

Starting the Inventory database

Follow these steps:

  1. Edit the file _start.sql in ZfD3/ZENWORKS directory. This file contains commands to start the Inventory database.
    If required, edit the file based on your Oracle settings.
  2. Ensure that Oracle is up and running. To run the Oracle Server Manager, type: $ svrmgrl
    This command loads the Oracle Server Manager.
  3. From the Server Manager, start the Inventory database. At the Server Manager prompt, type the following commands:

    @$HOME/ZfD3/zenworks/_start

    This command starts the Oracle instance, mounts the Inventory database, and displays the following output screen.

    Oracle instance started.
    Total System Global Area ...
    Fixed Size ...
    Variable Size Type: ...
    Database Buffers ...
    Redo Buffers ...
    Database mounted.
    Database opened.

While mounting the database, you may see the following error displayed: "End-of-file on communication channel". To resolve this error, create a new control file and use it to open the Inventory database.

To create a new control file:

  1. Open the file AlterCtrl.sql in ZENWORKS directory.
  2. Ensure the specified path settings in the file are correct.
  3. Run Oracle Server Manager and connect as an Internal user.
  4. At the Server Manager prompt, run AlterCtrl.sql.
    Type: SVRMGR> @$HOME/ZfD3/zenworks/AlterCtrl
  5. Start the Inventory database.

Initializing the Inventory database

Before using the Inventory database, initialize the Inventory database.

Follow these steps:

  1. Ensure that the inventory database is mounted.
  2. Provide the SiteID and SiteName that uniquely identify your Inventory database in the ZENworks tree.

    Open the file _dbinit.sql in ZENWORKS directory.
    This file contains a dummy SiteID and SiteName as:

    • siteid:=255;
    • siteName:='EXAMPLE-SITE';

    Change the SiteID and SiteName variables with your SiteID and SiteName and save the file.

    Note: Do not give an already existing SiteID or SiteName.

  3. Run the Oracle Server Manager. At the Server Manager prompt, type the following commands:

    3.1 Type: connect mw_dba/novell

    3.2 Type: @$HOME/ZfD3/zenworks/_dbinit This command initializes the database with the provided SiteID and SiteName. To check this, at the Server Manager prompt, type: SELECT * FROM zenworks.site; This command will display the SiteID and SiteName.

Configuring Inventory

It is required to create an identity of the Oracle Inventory database server in the ZENWORKS tree. This makes the database available for access by the inventory components.

Follow this procedure:

Create a ZENworks Inventory Database object and a Database Location policy. In the policy, indicate the Oracle inventory database server as the designated server for hosting Inventory database.

See Getting Started > Workstation Inventory
> Testing Workstation Inventory
> Configuring Workstation Inventory Settings
> Configuring the Policies for the Database
at http://www.novell.com/documentation/lg/zfd3/docui/index.htm

Getting the updated Oracle JDBC driver

Oracle JDBC driver that is shipped as part of ZfD3 is for Oracle 8i (8.1.5). If you are using a later version of Oracle, it is recommended to get the JDBC driver for that version. Oracle JDBC driver is present on the server under <oracle_home>/jdbc/lib directory, where <oracle_home> is the directory where Oracle is installed. The name of the file is classes111.zip. Alternatively, you may download one from Oracle's web site.

After you get the right JDBC driver, it is required to update it on ZfD3 inventory servers and consoles.

Follow these steps:

  1. To update all ZfD3 consoles.
    • Copy classes111.zip to ...\ConsoleOne\1.2\ConsoleOneExt
    • Copy classes111.zip to ...\ConsoleOne\1.2\lib\zen
  2. To update all Inventory servers.
    • Copy classes111.zip to ...\zenworks\lib directory

Relocating the inventory database files

If you want to move the inventory database files to a different directory path or stagger them on multiple physical disks, then you need to take care of the following:

  • The Oracle adminstrator has read and write permissions to the files on the new directory path(s).
  • The inventory database control file is re-created to reference the new path(s).

Note: Staggering the database files on multiple physical disks on the same server would improve the performance while accessing the database. So if you have this configuration then we strongly suggest that you use it.

You may relocate the following files only:

  • cim1.ora,....,cim9.ora,log?.ora and the trace files can be staggered.
  • The files AlterCtrl.sql, _dbinit.sql and _start.sql can be kept anywhere, however it is recommended to keep all of them together in a single directory.
  • All other files should reside on the same directory.

Follow these steps:

  1. Within Oracle Server Manager, stop the inventory database.
  2. Copy the files to a specified directory path(s).
  3. Open the file init.ora and update the path against the settings: 'control_files', 'background_dump_dest' and 'user_dump_dest'.
  4. Open the file _start.sql and ensure the path to the startup file init.ora is valid.
  5. Open the file AlterCtrl.sql and ensure that all the specified paths are valid. The file AlterCtrl.sql is the utility to re-create the control file.
  6. Run the Oracle Server Manager, connect as Oracle internal user and type:

    @<path>/AlterCtrl.sql

    This would re-create the inventory database control file.

Henceforth, to start the inventory database anytime, type:
@<path>/_start.sql.

Additional Information

Complete description of the Inventory database schema is available here.

See Administration > Workstation Inventory
> Understanding Workstation Inventory
> Understanding the ZENworks for Desktops 3 Inventory Database Schema

For More Information

Contact your local Novell Authorized Reseller or system house. And visit our Web site at: www.novell.com/products/zenworks.

If you have any questions about the information in this article, you may contact the author at rkrishnan@novell.com


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell