The following sections contain detailed information to help you set up your Inventory database:
If you have an Inventory database on Oracle, you can improve the performance of the database when you generate the inventory reports or query the database.
You use the database buffer cache to store the most recently used data blocks. The database cache is determined as DB_BLOCK_BUFFERS * DB_BLOCK_SIZE. These parameters are specified in the INIT.ORA file in the ZENWORKS\DATABASE directory on the database server.
DB_BLOCK_BUFFERS specifies the number of database buffers. DB_BLOCK_SIZE specifies the size of each database buffer in bytes.
The size of each buffer in the buffer cache is equal to the size of the data block.
Oracle recommends that the database buffer cache for any Online Transaction Processing Application (OLTP) should have a hit ratio of about 90%, which is optimal.
The ZfD Inventory database on Oracle has an approximate 88% hit ratio with a database cache size of 24 MB for 128 MB RAM, which is about 20% of total memory.
If there is additional memory, you configure the database cache size by increasing the DB_BLOCK_BUFFERS parameter in the INIT.ORA file.
If there are more volumes on the multiple physical disks of the database server, placing the Sybase database space files on separate volumes improves the performance while accessing the database.
When you install the Sybase database component of ZfD 3.2, the System Database file and the Database Spaces are installed in the volume on the database server you specify. On loading the Inventory database server, the System Database file (MGMTDB.DB) is loaded. This MGMTDB.DB file references the inventory information in the Database Spaces files. The Database Spaces files (MGMTDB1.DB, MGMTDB2.DB, MGMTDB3.DB, MGMTDB4.DB, MGMTDB5.DB, MGMTDB6.DB, MGMTDB7.DB, MGMTDB8.DB and MGMTDB9.DB) contain the inventory information.
The ALTERDB.PROPS file is installed on the database server in the PUBLIC\ZENWORKS\WMINV\PROPERTIES. You modify the sections in the file to specify the location of the Database Spaces on the volumes.
The contents of the ALTERDB.PROPS file is as follows:
#Database Space Properties
count=9
mgmtdb1=volume_location_of_mgmtdb1
mgmtdb2=volume_location_of_mgmtdb2
mgmtdb3=volume_location_of_mgmtdb3
mgmtdb4=volume_location_of_mgmtdb4
mgmtdb5=volume_location_of_mgmtdb5
mgmtdb6=volume_location_of_mgmtdb6
mgmtdb7=volume_location_of_mgmtdb7
mgmtdb1=volume_location_of_mgmtdb8
mgmtdb1=volume_location_of_mgmtdb9
.....
To organize the database spaces:
Ensure that the database is not loaded.
Ensure that the Inventory Service Manager is not running on the server.
Manually move the Database Space files on the server volume.
Move the Database Space files in the following way for better performance:
Modify the location of the nine Database Space files in the ALTERDB.PROPS file.
For example, enter mgmtdb3=SYS:\\ZENWORKS\\DATABASE
Load the database. Enter mgmtdbs on NetWare servers. On Windows NT/2000 servers, run the database service.
Stop the Naming server.
On NetWare servers, at the inventory server prompt, to view the ID of the Naming server, enter JAVA -show.
Enter JAVA -KILLid_of_the_naming_server.
On Windows NT/2000, close the Naming server window.
Ignore the error messages displayed on the console. These messages are displayed because the database space files are not loaded.
Ensure that the Database Location policy has been configured.
On the server console, run the AlterDBSpace service. Enter AlterDBSpace.
On the inventory server, the AlterDBSpace tool runs as a service.
You will see a message that the database is adjusted.
Exit the database and then load the database.
Ensure that while loading the database there are no errors. Errors indicate that the specified volume location of the database space files are incorrect or do not exist. Ensure that the path of the Database Spaces is correct in the ALTERDB.PROPS file and repeat the procedure to organize the Database Spaces.
IMPORTANT: If you place the Database Spaces in different volumes, the log file should be placed in the same volume as the System database file (MGMTDB.DB).
Improving the database cache size improves database performance.
You can improve the performance of the Inventory database maintained in Sybase on NetWare or Windows NT/2000 servers. The default database cache size is 16 MB; however, this database cache size may not be adequate for large databases with more than 10,000 workstations.
You should change the database cache size to an optimum size. We recommend a database cache size that is one-fourth of the database size. You must also consider server memory size while assigning a cache size. For example, if you have 128 MB RAM, then a cache size of 32 MB is recommended.
To change the database cache size on a NetWare server:
Close all connections to the Inventory database.
Quit the Sybase server.
Open the MGMTDB.NCF file in the SYS:\SYSTEM directory.
Modify the -c parameter.
For example, -c 64M sets the cache size to 64 MB.
Save the file.
On the server console, load the Inventory database. Enter MGMTDBS.
To change the database cache size on a Windows NT/2000 server:
Run the NTDBCONFIGURE.EXE file from PUBLIC\ZENWORKS.
Modify the -c parameter.
Save the file.
Restart the server so that the Inventory database service (Adaptive Service Anywhere - ZENworks for Desktops 3) starts up.
The Inventory Database service configuration tool lets you modify the startup parameters to optimize the Sybase database on Windows NT/2000 servers.
To run this tool:
Run NTDBCONFIG.EXE located in the ZENWORKS directory on the database server.
Modify the parameters as per the Sybase specification.
Ensure that you specify valid values for the parameters.
Click OK.
Restart the database service (ASA Adaptive Anywhere).
The parameters are as follows:
-c: Sets the initial memory reserves for caching database pages and other server information. For example, -c 32M reserves 32 MB cache size.
-gc: Sets the maximum length of time in minutes that the database server runs without doing a checkpoint on each database. The default value is 60 minutes. For example, -gc sets the checkpoint time as 120 minutes.
-m: Deletes the transaction log when a checkpoint is done, either at shutdown or as a result of a checkpoint scheduled by the server.
-n: Specifies the name of the database server. For example, -n WARTHOG names the server WARTHOG.
-ti: Disconnects the connections that have not submitted a request for a certain number of minutes. The default is 240 (4 hours). A client machine in the middle of the database transaction locks until the transaction ends or the connection terminates. The -ti option is provided to disconnect inactive connections and to free their locks. For example, specify -ti 400.
-x: Specifies a communication link. For example, -x tcpip indicates a TCP/IP link.
If you delete the Workstation object in ConsoleOne, the inventory information for that Workstation object is deleted from the Inventory database server it is attached to. Also, the inventory information is deleted from all the next-level servers for that particular Inventory database server.
ZfD provides a database sync tool to synchronize the Workstation objects stored in the Inventory database with the Workstation objects in eDirectory. This tool removes the workstations that do not exist in eDirectory from the Inventory database. The excess workstations in the Inventory database exist because these workstations may have been deleted from eDirectory; however, the corresponding workstations were not removed from the database.
Use this tool regularly to maintain the database in a consistent state with eDirectory. You must run this tool for each Inventory database.
HINT: You must ensure that the Service Manager is loaded when you run the Inventory database sync tool.
To run this tool:
Generate a lookup file in the NDS Lookup Phase.
ZfD compares the list of workstations in the database with those in eDirectory and generates a lookup file. This file contains the list of workstations to remove from the database.
The server property file contains the [NDSLookupForDB Service] section with the lookup filename in the ARGUMENTS parameter. The default lookup filename (WSDELETE.LOK) file is located in the PUBLIC\ZENWORKS\WMINV\LOG directory.
The lookup filename in this section and the [DBDelete Service] section of the server property file should be the same.
Delete workstations in the lookup file from the Inventory database in the Database Delete Phase.
In the [DBDelete Service] section of the properties file, specify the lookup filename.
At the inventory server console, enter:
StartSer DBDelete
The WSDELETE.LOG log file located in the \PUBLIC\ZENWORKS\WMINV\LOGS directory contains the status of deletion. This file contains information as to whether the database was synchronized successfully with eDirectory.
ZfD provides an option to back up the Inventory database from the server. We recommend that you back up the database on a weekly basis. However, if you are tracking the inventory of workstations frequently, increase the frequency of backup.
The following sections contain additional information to help you back up the Inventory database.
You can back up the database files and the transaction log to the location relative to the SCANDIR path.
To use this tool:
To run the backup tool on NetWare or Windows NT/2000 servers,
At the inventory server console, enter StartSer DBBACKUP.
View the status of the backup in the backup log file.
The database will be copied to SYS:\ZENWORKS\DATABASE\directory_you_specify.
To restore the database:
If the Inventory database server is up, stop the Storer service. At the database server console, enter StopSer Storer.
Exit the Sybase database.
On NetWare servers: At the database server prompt, enter q to stop the Sybase database.
On Windows NT/2000: Stop the Sybase service (Adaptive Service Anywhere - ZENworks for Desktops 3).
Copy the backup files, overwriting the working database files.
Restart the database server.
The backup tool creates a log file, BACSTATUS.TXT, located in the ZENWORKS\DATABASE directory on NetWare and Windows NT/2000 servers. The log records the status of the backup operation. Open this text file to view the status of the backup. This file increases in size for every backup operation. Remove the existing contents of the file if you do not require the details.
ZfD provides an option to back up the Inventory database from the server. However, if you have a database backup and restore method such as Recovery Manager, we recommend that you continue to use your existing backup method.
To back up the database:
If the Inventory database server is up, stop the Storer service. At the database server console, enter StopSer Storer.
Load the Oracle Server Manager.
On NetWare server with Oracle 8i, enter svrmgr31.
On NetWare server with Oracle 8.0.4, enter svrmgr30.
On Windows NT/2000 server with Oracle 8i Enterprise Edition, from the taskbar, click Start > Run > enter svrmgrl.
Enter the following commands:
set instance databaservername-databaseinstance-IPC, where databaseinstance refers to the database instance that you have set up earlier. See Loading the Inventory Database as a Separate Oracle Instance in Workstation Inventory in Deployment.
For example, set instance austr-zfd3-ipc.
Connect as an administrator. For example, if the administrator's internal name is internal, at the Server Manager prompt, enter connect internal/password.
where password is the password created earlier. See Loading the Inventory Database as a Separate Oracle Instance in Workstation Inventory in Deployment.
Ensure that no other databases are mounted. At the prompt, enter shutdown normal.
Disconnect and exit from the Server Manager. At the Server Manager prompt, enter disconnect;
Enter exit;
Copy the complete ZFD3\ORACLE directory to a backup volume or disk.
After the backup is done, ensure that the backup copy of the database matches the original copy. Perform database verification to verify the integrity of the backup.
To verify the database integrity on a NetWare server with Oracle 8i, enter load DBV81.NLM FILE=path_to_the_database_file BLOCKSIZE=4096
To verify the database integrity on a NetWare server with Oracle 8.0.4, enter load DBV80.NLM FILE=path_to_the_database_file BLOCKSIZE=4096.
To verify the database integrity on a Windows NT/2000 server with Oracle 8i, enter DBV.EXE FILE=path_to_the_database_file BLOCKSIZE=4096
Example: enter DBV.EXE FILE=d:\zfd3\oracle\database\cim1.ora BLOCKSIZE=4096
Also, run this command for the following files: CIM1.ORA, CIM2.ORA, CIM3.ORA, CIM4.ORA, CIM5.ORA, CIM6.ORA, CIM7.ORA, CIM8.ORA, CIM9.ORA, SYS1.ORA, and CTL1.ORA.
If the database backup is successful, ensure that there are no error messages on the verified pages. Ensure that the following displayed parameters display a zero value: TOTAL PAGES FAILING (DATA)=0, TOTAL PAGES FAILING (INDEX)=0, and TOTAL PAGES MARKED CORRUPT=0.
To restore the database:
If the Inventory database server is up, stop the Storer service. At the database server console, enter StopSer Storer.
Load the Oracle Server Manager.
On a NetWare server with Oracle 8i, enter svrmgr31.
On a NetWare server with Oracle 8.0.4, enter svrmgr30.
On a Windows NT/2000 server with Oracle 8i Enterprise Edition, from the taskbar, click Start > Run > enter svrmgrl.
Connect as an administrator. For example, if the administrator's internal name is internal, at the Server Manager prompt, enter connect internal/password_for_administrator.
Ensure that no other databases are mounted. Enter shutdown normal.
Disconnect and exit from the Server Manager. At the Server Manager prompt, enter disconnect;
Enter exit;
Copy the database from the backup location.
If you copy the database to a different location than the earlier location, modify the location in the following files to specify the new path:
control_files=location_of_CTLl.ORA\CTL1.ORA
background_dump_dest=location_of_TRACE_dir\TRACE
user_dump_dest=location_of_TRACE_dir\TRACE
startup pfile=location_of_the_INIT.ORA\INIT.ORA
For example, modify the existing DATA:\ZFD3\ORACLE\DATABASE path to ORACLE:\ZFD3\ORACLE\DATABASE in ALTERCTRL.SQL.
In this .SQL file, modify the path for the following parameters, if required.
startup nomount pfile=oracle:\zfd3\oracle\database\INIT.ORA
logfile group 1 'oracle:\zfd3\oracle\database\log1.ora' size 256K,
logfile group 2 'oracle:\zfd3\oracle\database\log2.ora' size 256K
datafile 'oracle:\zfd3\oracle\database\sys1.ora',
'oracle:\zfd3\oracle\database\rbs1.ora',
'oracle:\zfd3\oracle\database\cim1.ora',
'oracle:\zfd3\oracle\database\cim2.ora',
'oracle:\zfd3\oracle\database\cim3.ora',
'oracle:\zfd3\oracle\database\cim4.ora',
'oracle:\zfd3\oracle\database\cim5.ora',
'oracle:\zfd3\oracle\database\cim6.ora',
'oracle:\zfd3\oracle\database\cim7.ora',
'oracle:\zfd3\oracle\database\cim8.ora',
'oracle:\zfd3\oracle\database\cim9.ora',
'oracle:\zfd3\oracle\database\tmp1.ora'
Save the changes.
Load the restored database.
Ensure that the following requirements are met:
On Linux* 6.0 or above: Oracle 8i (8.1.5 or above) Enterprise Edition
On Solaris* 6.2 or above on Sparc*/Intel*: Oracle 8i (8.1.5 or above) Enterprise Edition
Hard disk free space: 500 MB or above
Primary memory: 256 MB or above
Follow the instructions in these sections:
Follow these steps:
Log in to the Linux box as Oracle DBA user.
Create a ZfD3 directory. Change to this directory.
Extract the file from the \ZENWORKS\PRODUCTS\DATABASE
\ORACLE directory into ZfD3 directory.
On a Linux / Solaris(Intel) server, extract INVORACLE8IUNIXINTEL.TAR.GZ file.
On a Sparc Solaris server, extract INVORACLE8ISPARCSOL.TAR.GZ file.
Enter the following commands:
On a Linux/Solaris(Intel) server, enter $ gunzip InvOracle8iUNIXintel.tar.gz
Enter $ tar -xvf InvOracle8iUNIXintel.tar
On a Sparc Solaris server server, enter $ gunzip InvOracle8iSparcSol.tar.gz
Enter $ tar -xvf InvOracle8iSparcSol.tar
This extracts the Inventory database in the home/ZfD3/zenworks directory, where home is the home directory of the Oracle user you logged in as.
Edit the _START.SQL file in ZfD3/ZENWORKS directory. This file contains commands to start the Inventory database.
If required, edit the file based on your Oracle settings. For example, if you are starting the Inventory database along with other Oracle databases, create a Oracle database instance for the Inventory database. Set the Oracle instance name in _START.SQL. Otherwise, shut down any existing databases.
Ensure that Oracle is up and running.
To run the Oracle Server Manager, enter $ svrmgr1
This command loads the Oracle Server Manager.
From the Server Manager, start the Inventory database.
At the Server Manager prompt, enter the following commands:
Type @$HOME/ZfD3/zenworks/_start
This command starts the Oracle instance, mounts the Inventory database, and displays the following output information.
ORACLE instance started.Total System Global Area ... Fixed Size ... Variable Size... Database Buffers... Redo Buffers... Database mounted. Database opened.
While mounting the database, you may see the following error: End-of-file on communication channel. Resolve this error by creating a new control file and using it to open the Inventory database.
To create a new control file:
Before using the Inventory database, initialize the database. Initializing the Inventory database assigns a unique site ID and site name to the database. Using these details, the Inventory database can be identified at the enterprise level.
Follow these steps:
Ensure that the Inventory database is mounted.
Specify a site ID and site name that uniquely identify your Inventory database in the ZENworks tree.
Open the _DBINIT.SQL file in the ZFD3/ZENWORKS directory. This file contains a dummy site ID and site name as:
siteid:=255;
siteName:='example-site';
Change the site ID and site name variables with your site ID and site name and save the file.
IMPORTANT: Do not use an already existing site ID and site name.
Run the Oracle Server Manager. At the Server Manager prompt, enter the following commands:
Enter connect mw_dba/novell
Enter @$HOME/ZfD3/zenworks/_dbinit
This command initializes the database with the provided site ID and site name. To verify this, at the Server Manager prompt, enter select * from zenworks.site;
While initializing the database, you may see the following error: Declare * ORA-06553: PlS-908: The stored format of SYS.STANDARD is not supported by this release.
This error indicates that the Oracle version that is in use is later than 8.1.5.
To correct this problem, upgrade the Inventory database to initialize the Inventory database.
Follow the steps in Upgrading the ZfD 3.2 Inventory Database on Oracle 8.1. x .
Create an identity for the Oracle Inventory database server in the ZENWORKS tree. This makes the database available for access by the inventory components.
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 Configure the Policies for the Database in Workstation Inventory in Deployment. Ensure that you specify the IP address of the Oracle Inventory database server in the Database policy.
When you are mounting ZfD 3.2 Inventory database on a server with Oracle 8.1.x, initializing the database using _dbinit.sql may be unsuccessful and you may see the following error message:
DECLARE * ORA-06553: PLS-908: The stored format of SYS.STANDARD is not supported by this release.
In this scenario, it is not possible to use the Inventory database. To resolve this problem, upgrade the Inventory database to the existing Oracle version.
Configure and mount the Inventory database.
On NetWare and Windows NT/2000 servers, follow the instructions in Configuring the Inventory Database for Oracle in Workstation Inventory in Deployment. Do not follow the last step in the procedure, which instructs you initialize the database on the server.
On UNIX* servers, see Using the ZfD 3.2 Inventory Database on Oracle 8i for Linux and Solaris .
Run the Oracle Server Manager.
On a NetWare server: From the server prompt, enter load svrmgr31.nlm.
On a Windows NT/2000 server: From the taskbar, click Start > Run. Enter svrmgrl.exe.
On a UNIX server: Log in as an Oracle administrator. At the login prompt, run svrmgrl.
At the Oracle Server Manager prompt:
Enter connect internal/password where password is the Oracle internal user password. On NetWare or Windows NT/2000 servers, enter spool path\upgrade81X.log
@%oracle_home%\rdbms\admin\u801050.sql
On UNIX-based servers, enter the following commands: spool $HOME/upgrade81X.log
@%oracle_home%\rdbms\admin\u801050.sql
The upgrade tool starts upgrading the Inventory database. Wait until the upgrade tool completes the upgrade. The upgrade tool may take some time to complete.
At the Oracle Server Manager prompt,
The Inventory database will be upgraded to Oracle 8.1.x. The status of update is logged in the UPGRADE81X.LOGfile.
Initialize the Inventory database.
Update with the Oracle JDBC driver.
The Oracle JDBC driver that is shipped as part of ZfD 3.2 is for Oracle 8i (8.1.5). If you are using a later version of Oracle, we recommend that you use the JDBC driver for the same version. Oracle JDBC driver is located on the server in the oracle_home/JDBC/LIB directory, where oracle_home is the directory where Oracle is installed. The name of the driver file is CLASSES111.ZIP. Alternatively, you can download the file from Oracle Web site. After you get the correct JDBC driver, update the file on ZfD 3.2 inventory servers and consoles.
Follow these steps:
To update all ZfD 3.2 consoles, copy CLASSES111.ZIP to the \CONSOLEONE\1.2\CONSOLEONEEXT and CONSOLEONE\1.2\LIB\ZEN directories
To update all inventory servers, copy CLASSES111.ZIP to the ZENWORKS\LIB directory.
This section describes how to install and configure the Sybase ODBC driver in order to access the ZfD 3.2 Inventory database.
Sybase ODBC driver version 7.0.0.313 is available on the ZfD 3.2 Companion CD shipped with ZfD 3.2.
To configure Sybase ODBC driver for the ZfD 3.2 Inventory database:
Ensure the following prerequisites are met:
Install the Sybase ODBC Driver.
Extract the files from \ODBC\SybaseODBC.zip from the ZfD 3.2 Companion CD to a drive.
Copy the files from the directory where you have extracted the files to \PROGRAMFILES\SYBASE directory.
Double-click the SYBASEODBC.REG file. The following message Information in SybaseODBC.reg has been successfully entered into the registry should be displayed.
SYBASEODBC.REG contains the required registry settings for Sybase ODBC driver. Modifying this file may corrupt system registry settings, thus making your server unusable.
Configure the Sybase ODBC driver
From the ODBC Data Source Administrator, click Start > Settings > Control Panel > ODBC Data Sources.
From the ODBC data Source Administrator, select User Data Sources > Sybase ODBC > click Configure.
This will display the ODBC Configuration for Adaptive Server Anywhere dialog.
Click the Login tab.
Ensure that you have entered a user id and password as follows:
User ID: mw_dba
Password: novell
Click the Database tab.
Enter the following details.
Server Name: IP address of the server on which Sybase is running.
Database Name: Database Name: mgmtdb
Click the Network tab > check the TCP/IP option.
Specify the host name or IP Address of the server.
The format should be host=IP_address where IP_address is the IP address or host name of the server on which Sybase is running.
Click ODBC tab > Test Connection.
The message Connection Successful should be displayed. This message indicates that the Sybase ODBC driver has been configured correctly. If there is an error message, repeat Step 3.