Banner
HomeTOCPrevNextGlossSearchHelp

PDF

Table of Contents

CiscoWorks Database Tables


CiscoWorks Database Tables

CiscoWorks Database Tables

This appendix contains information on the CiscoWorks database table structures. The following tables are described:

Certain tables that exist in the Sybase database are not described in this appendix. These tables include the security tables and normally need not be accessed. It is highly recommended that you do not edit these tables.

Depending on your network management platform, you may not have access to certain CiscoWorks applications and therefore do not have access to those associated tables.

fig_1.gif

Caution Do not modify database table information. For Sybase-knowledgable users, refer to the schema files located in $NMSROOT/etc.


Reference on Database Structure

Because this release of CiscoWorks uses Sybase 10, there is a different method to access tables. For example use dbname.username.tablename.columnname, depending on which database you are currently in.

The two CiscoWorks databases, nmsdb and polldb, have different purposes.

Functions nms Database poll Database
Storage data description Stores device inventory and configuration information including device name, community strings, and contact information. Stores dynamic information on your network devices including polling tables created using the Device Polling application. This information was known as transaction log information in previous releases of CiscoWorks.
Backup strategy Implements incremental transaction log backup when threshold is reached. Dumps transaction log when database threshold is reached. No recovery of this information is supported. If you want to keep this dynamic information for analysis, copy the information to another storage space on your workstation.
Schema file location $NMSROOT/etc/cw_nms_schema $NMSROOT/etc/cw_polldb_schema
Table storage(1) Stores tables including
· AutoInstall table.
· Device inventory tables: admins, devices, interfaces, ifaddresses, contacts, lines, locations, networks, people, phones, protocol types, vendor.
· Device configuration tables: device_config, history.
· Domain tables including domains and domain_devices.
· Global Commands and Scheduler tables: gcmds, gcmds_domains, and crons.
· Configuration Snap-In Manager tables: pccmdset and pcdevset.
· Software management table, SysFiles.
Stores tables including
· Polling tables: attr, columns, grouptemplate, pollers, polls, polls_config, sample tables, start_stop, uint4.
· Log table, ciscolog.
Environment variables CW_NMSDB default name is nms CW_POLLDB default name is $CW_NMSDB

(1)
To search for database table information using Sybase commands, use the following format: dbname.username.tablename.columnname.


CiscoWorks Database Tables

This section provides tables depicting the relationship between the major tables in the CiscoWorks database, and lists table structure characteristics.

Table C-1 lists the conventions used in defining fields.

Table C-1 Database Field Conventions

Convention Description
int A whole number between 231 --1 (2,147,483,647) and --231 (--2,147,483,648) inclusive. Storage size is 4 bytes.
uint4 A user-defined data type to store unsigned integer 232 --1.
smallint A whole number between 215 --1 (32,767) and --215 (--32,768) inclusive. Storage size is 2 bytes.
tinyint A whole number between 0 and 255 inclusive. Storage size is 1 byte.
NULL A field that does not have to be filled in. The word null does not have to be entered; the field may be left blank if no data is entered.
varchar A variable character defined by the number of characters in parentheses.
text A text string.
image A block of data.

Table-to-table links throughout the database structure are accomplished using id fields---for example, device_id, people_id, admin_id, and so on.


Note Sybase software is case-sensitive, so enter all database tables in lower case.


AutoInstall Database Table

The AutoInstall Manager application uses the autoinstall table to store data records on the following items. (See Table C-2.)

Table C-2 autoinstall Table File Structure

Field Name Field Type Field Value Description
aim_id int
AutoInstall ID.
aim_state tinyint
Device state. Disabled = 0. Enabled = 1.
device_id int
Device ID. Links to the devices table.
dev_if_name varchar (32) NULL Interface name.
dev_if_addr varchar (64) NULL Interface address for the device.
dev_if_subn varchar (64) NULL Subnet mask for the device.
helper_addr varchar (64) NULL Helper address.
config_ver int NULL Configuration file version to use.
neighbor_id int NULL Device ID of the neighbor device from the devices table.
neigh_if_id int NULL Interface ID of the neighbor device used to access the if_addresses table. Links to the interfaces table.


CiscoConnect Database Table

The CiscoConnect table contains data on mapping the CiscoWorks user IDs to People IDs so that CiscoConnect can access device data such as the contact's name, address, and phone number.

Table C-3 cisco_connect_users Table File Structure

Field Name Field Type Field Value Description
user_id smallint NULL CiscoWorks user ID.
people_id smallint NULL People ID. Links to the people table.
user_name char(32) NULL Name of user.

There are also some triggers created so that any time changes are made to the users table, the appropriate changes are reflected in this table.

The following are the views (virtual tables) created:


Device Inventory Database Tables

The device inventory tables consist of all the information that you can associate with a specific device, including contact, address, telephone, and vendor data.

Figure C-1 illustrates CiscoWorks database table interrelationships for device inventory.

Figure C-1 Device Inventory Database Tables Relationships

nm156.gif

Table C-4, Table C-5, Table C-6, Table C-7, Table C-8, Table C-9, Table C-10, Table C-11, Table C-12, Table C-13, Table C-14, and Table C-15 are used for device inventory.

Table C-4 admins Table File Structure

Field Name Field Type Field Value Description
admin_id smallint
Administration ID.
admin_name char (32)
Full name of administrator.
admin_desc 64 Character NULL Description of administrator duties or location.

Table C-5 devices Table File Structure

Field Name Field Type Field Value Description
device_id int
Device ID.
device_type smallint NULL Specific Cisco device platform.
device_name 32 Character
Name of Cisco device.
device_domain varchar (128) NULL Internet domain in which this device belongs. For example, cisco.com.
device_desc varchar (255) NULL Description of Cisco device.
sysobject_id varchar (64) NULL Identifies vendor and device type.
rd_community char (32) NULL Read community string.
community char (32) NULL Write community string.
enable_passwd varchar (32) NULL Password to enable the device.
vty_passwd varchar (32) NULL Password to allow terminal interaction with a Cisco device.
admin_id smallint
Administration ID. Links to the admins table.
serial_number char (32) NULL Identification number for the device chassis.
vendor_id smallint
Vendor ID. Links to the vendor table.
address_id smallint
Address ID. Links to the locations table.
software_desc varchar (254) NULL Description of current software release on the device.
software_ver char (16) NULL Current software release version number.
hardware_desc char (64) NULL Description of device hardware.
hardware_ver char (16) NULL Current hardware version number.
platform_id int NULL Identification number for the Cisco device type.
has_flash int NULL Flash memory capabilities.
has_env int NULL Environmental card capabilities.
init_timestamp datetime NULL Date and time that the device was initialized.
loaded_conf int NULL The configuration file marked with the flag.
monitor_ints char (1) NULL Interfaces monitored by the Device Monitor daemon.
monitor_env char (1) NULL Whether the Environmental card is being monitored by the Device Monitor daemon.
monitor_events char (1) NULL Whether the Device Monitor daemon is monitoring device events.
monitor_poll int NULL Whether polling is occurring.

Table C-6 interfaces Table File Structure

Field Name Field Type Field Value Description
interface_id int
Interface ID.
device_id int
Device ID. Links to the devices table.
interface_type int NULL Type of interface (serial, Ethernet, and so on).
interface_speed int NULL Speed of interface.
interface_name char (32)
Name of interface.
interface_desc char (64) NULL Description of the type of interface.
hardware_addr char (64) NULL Description of device hardware. Links to the devices table.
hardware_ver char (16) NULL Current hardware version number. Links to the devices table.
line_id int
Line ID. Links to the lines table.

Table C-7 if_addresses Table File Structure

Field Name Field Type Field Value Description
device_id int
Device ID. Links to the devices table.
interface_id int
Type of interface (serial, Ethernet, and so on). Links to interfaces table.
protocol_id int
Protocol ID.
protocol_addr char (64)
Protocol address. Links to the protocols table.
protocol_subn char(64)
Protocol subnet mask.

Table C-8 contacts Table File Structure

Field Name Field Type Field Value Description
device_id int
Device ID. Links to the devices table.
people_id smallint
People ID. Links to the people table.

Table C-9 lines Table File Structure

Field Name Field Type Field Value Description
line_id int
Line ID.
line_group_id int
Line group ID.
line_type smallint NULL Type of line used for this device:
· 0 = No designation (default setting)
· 1 = Ethernet thin wire
· 2 = Ethernet thick wire
· 3 = Ethernet twisted pair
· 4 = Serial line
line_desc char (16) NULL Description of line.

Table C-10 locations Table File Structure

Field Name Field Type Field Value Description
address_id smallint
Address ID.
location char (64)
Location of the device.
street char (32) NULL Street name.
street_two char (32) NULL Second line for street name.
city 16 Character NULL City name.
state char (2) NULL State name.
country char (16) NULL Country name.
zip_code char (16) NULL Zip code or country code.

Table C-11 networks Table File Structure

Field Name Field Type Field Value Description
network_id smallint
Network ID.
network_name char (32)
Name of the network where this device is located.
admin_id smallint
Administration ID. Links to the admins table.

Table C-12 people Table File Structure

Field Name Field Type Field Value Description
people_id smallint
People ID.
address_id smallint
Address ID. Links to the locations table.
last_name char (16)
Last name of device contact person.
first_name char (16)
First name of device contact person.
middle_name char (16) NULL Middle name of device contact person.
phone_number char (16) NULL Telephone number of device contact person. Links to the phones table.
email_addr char (64) NULL Electronic mail address of device contact person.
title char (32) NULL Job title of device contact person.
nic_id char (8) NULL Internet NIC ID.

Table C-13 phones Table File Structure

Field Name Field Type Field Value Description
people_id int NULL People ID. Links to the people table.
phone_desc int NULL Description of telephone number.
phone_number smallint NULL Telephone number.
phone_id char (64) NULL Telephone ID.

Table C-14 protocol types Table File Structure

Field Name Field Type Field Value Description
protocol_type smallint
Type of protocol running on the device.
type_desc char (64)
Description of the protocol type.

Table C-15 vendor Table File Structure

Field Name Field Type Field Value Description
vendor_id smallint
Vendor ID.
vendor_name char (32)
Name of the vendor where the device was purchased.
street char (32) NULL Street name of vendor.
street_two char (32) NULL Second line for street name of vendor.
city char (64) NULL City name for vendor.
state char (64) NULL State name for vendor.
country char (64) NULL Country name for vendor.
zip_code char (64) NULL Zip code or country code for vendor.


Polling Database Tables

Device polling consists of all the information that you want to gather from a device based on the way you have set up your poll groups.

Figure C-2 illustrates CiscoWorks database table interrelationships in device polling.

Figure C-2 Device Polling Database Tables Relationships

nm155.gif

The following database tables are used during device polling. These tables are described below.

The tables listed (Table C-16, Table C-17, Table C-18, Table C-19, Table C-20, Table C-21, Table C-22, Table C-23, Table C-24, Table C-25, and Table C-26) are used for polling.

Table C-16 attr Table File Structure

Field Name Field Type Field Value Description
attr_id int
Attribute ID.
snm_name varchar
MIB element name in the SunNet Manager software.
ncs_name varchar NULL MIB element name in the CiscoWorks software.
object_id varchar NULL MIB object ID.
iftable int NULL Interfaces table flag. 0 = not iftable. 1 = iftable.

Table C-17 columns Table File Structure

Field Name Field Type Field Value Description
poll_id smallint
Poll ID.
column_name varchar
Column of record in database.
attr_id int
Attribute ID. Links to the attr table.
datatype smallint
Sybase database type.

Table C-18 pollers Table File Structure

Field Name Field Type Field Value Description
poller_host char (15)
Name of the workstation that nmpolld is running on.
poller_id int
Poller ID.
pid int
Process identification number.

Table C-19 polls Table File Structure

Field Name Field Type Field Value Description
poll_id int
Poll ID.
poll_name varchar (80)
User-defined name for poll group.
table_name char (30)
Table name for data repository table.
poll_rate int NULL Desired polling interval (secs). Defaults are -1 for tables to be deleted; 0 for tables to be disabled.

Table C-20 polls_config Table File Structure

Field Name Field Type Field Value Description
poll_id int
Poll ID.
poller_id varchar
Poller ID.
device_id int
Device ID. Links to the devices table.
attr_id int NULL Attribute ID. Links to the attr table.
inst varchar NULL Instance ID. Links to the interface tables interface ID.

Table C-21 sample Table File Structure

Field Name Field Type Field Value Description
timestamp datetime NULL Date and time the device was initialized.
device_id int NULL Device ID. Links to the devices table.
sysUpTime uint4 NULL MIB variable.
inst varchar NULL Instance value.
rec_type tinyint NULL Record type.
var1 uint4 NULL ifInOctets MIB variable.
var2 uint4 NULL ifInUcastPkts MIB variable.
var3 uint4 NULL ifInNUcastPkts MIB variable.
var4 uint4 NULL ifOutOctets MIB variable.
var5 uint4 NULL ifOutUcastPkts MIB variable.
var6 uint4 NULL ifOutNUcastPkts MIB variable.
var7 uint4 NULL ifInErrors MIB variable.
var8 uint4 NULL ifOutErrors MIB variable.
var9 int NULL ifSpeed MIB variable.
var10 int NULL ifAdminStatus MIB variable.
var11 int NULL ifOperStatus MIB variable.

Table C-22 sample_error Table File Structure

Field Name Field Type Field Value Description
timestamp datetime NULL Date and time the device was initialized.
device_id int NULL Device ID. Links to the devices table.
sysUpTime uint4 NULL MIB variable.
inst varchar NULL Instance value.
rec_type tinyint NULL Record type.
var1 uint4 NULL ifInUcastPkts MIB variable.
var2 uint4 NULL ifInNUcastPkts MIB variable.
var3 uint4 NULL ifOutUcastPkts MIB variable.
var4 uint4 NULL ifOutNUcastPkts MIB variable.
var5 uint4 NULL ifInDiscards MIB variable.
var6 uint4 NULL ifInErrors MIB variable.
var7 uint4 NULL ifOutDiscards MIB variable.
var8 uint4 NULL ifOutErrors MIB variable.

Table C-23 sample_mix Table File Structure

Field Name Field Type Field Value Description
timestamp datetime NULL Date and time the device was initialized.
device_id int NULL Device ID. Links to the devices table.
sysUpTime uint4 NULL MIB variable.
inst varchar NULL Instance value.
rec_type tinyint NULL Record type.
var1 uint4 NULL ipForwDatagrams MIB variable.
var2 uint4 NULL vinesForwarded MIB variable.
var3 uint4 NULL novellForward MIB variable.
var4 uint4 NULL atForward MIB variable.
var5 uint4 NULL dnForward MIB variable.
var6 uint4 NULL xnsForward MIB variable.

Table C-24 sample_traffic Table File Structure

Field Name Field Type Field Value Description
timestamp datetime NULL Date and time the device was initialized.
device_id int NULL Device ID. Links to the devices table.
SysUpTime uint4 NULL MIB variable.
inst varchar NULL Instance value.
rec_type tinyint NULL Record type.
var1 uint4 NULL ifInOctets MIB variable.
var2 uint4 NULL ifOutOctets MIB variable.
var3 int NULL ifOperStatus MIB variable.
var4 int NULL ifAdminStatus MIB variable.
var5 uint4 NULL ifInUcastPkts MIB variable.
var6 uint4 NULL ifInNUcastPkts MIB variable.
var7 uint4 NULL ifOutUcastPkts MIB variable.
var8 uint4 NULL ifOutNUcastPkts MIB variable.

Table C-25 sample_load Table File Structure

Field Name Field Type Field Value Description
timestamp datetime NULL Date and time the device was initialized.
device_id int NULL Device ID. Links to the devices table.
SysUpTime uint4 NULL MIB variable.
inst varchar NULL Instance value.
rec_type tinyint NULL Record type.
var1 int NULL freeMem MIB variable.
var2 uint4 NULL bufferFail MIB variable.
var3 int NULL busyPer MIB variable.
var4 int NULL ifOutQLen MIB variable.

Table C-26 start_stop Table File Structure

Field Name Field Type Field Value Description
table_name char (3)
Name of polling table.
poller_id varchar
Poller ID.
type tinyint
Device status. 0 = start, 1 = stop, 2 = restart.
clock_time datetime NULL Date and time polling stopped, started, or restarted.
device_id int NULL Device ID. Links to the devices table.


Device Configuration Database Tables

Device configuration consists of all the information that you want to gather from a device during device configuration.

The tables listed in Table C-27 and Table C-28 are used for device configuration.

Table C-27 DevConfigs Table File Structure

Field Name Field Type Field Value Description
conf_id int
Configuration ID.
creator varchar (64)
Name of person who created or loaded configuration.
time_created int
Date and time configuration was created.
conf_stat char (2) NULL Date and time configuration was started.
user_image text NULL Name of the Cisco configuration file image.
machine_image text
Name of the compiled configuration file version.
comments text
Description of the configuration file.

Table C-28 DevConfHist Table File Structure

Field Name Field Type Field Value Description
device_id int
Device ID. Links to the devices table.
conf_id int
Configuration ID. Links to the device_config table.
conf_ver int
Version of the configuration file.
software_ver varchar (16)
Software release version.


Domains Database Tables

Domains consists of all the information on the collection of routers you have created to manage your network.

The tables listed in Table C-29 and Table C-30 are used for creating domains.

Table C-29 domains Table File Structure

Field Name Field Type Field Value Description
domain_id int
Domain ID.
domain_name char (32)
Name of the domain.

Table C-30 domain_devices Table File Structure

Field Name Field Type Field Value Description
domain_id int
Domain ID. Links to the domains table.
device_id int
Device ID. Links to the devices table.


Global Commands Database Tables

The Global Commands and Scheduler tables include information that CiscoWorks needs to send global commands to a device set.

The tables listed (Table C-31, Table C-32, and Table C-33) are used for the Global Command Manager application and the Scheduler utility.

Table C-31 gcmds Table File Structure

Field Name Field Type Field Value Description
gcmd_id int
Global command ID.
gcmd_name char (32) NULL Name of global command.
command text NULL Command syntax.
user_name char (32) NULL Name of user.
status int NULL Status of command.

Table C-32 gcmds_domains Table File Structure

Field Name Field Type Field Value Description
gcmd_id int
Global command ID. Links to the gcmds table.
domain_id int
Domain ID. Links to the domains table.

Table C-33 crons Table File Structure

Field Name Field Type Field Value Description
cron_id int
Cron ID.
gcmd_id int
Global command ID. Links to the gcmds table.
cron_name char (32) NULL Name of cron job in the Scheduler utility.
user_name char (32) NULL Name of user.
command text NULL Command syntax sent to Scheduler utility. Links to the gcmds table.
status int
Status of command. Links to the gcmds table.
minutes int
Time in minutes of cron.
hour int
Time in hours of cron.
day int
Day of cron job.
month int
Month of cron job.
week int
Week of cron job.


Configuration Snap-In Manager Database Tables

The configuration snap-in command tables include information that CiscoWorks needs to send snap-in commands to a device set.

The tables listed in Table C-34 and Table C-35 are used for the Configuration Snap-In Manager application.

Table C-34 pccmdset Table File Structure

Field Name Field Type Field Value Description
cfgcmdset_id int
Configuration snap-in command ID.
group_name char (32)
Name of the set of commands.
group_type int
Type of snap-in commands.
the_group image NULL Set of snap-in commands.
domain char (32)
Domain name. Links to the domains table.
device_set char (32)
The set of devices to which the command will be sent.
device_set_type int
The platform type of the device set.
description char (255)
A description of the configuration snap-in command.

Table C-35 pcdevset Table File Structure

Field Name Field Type Field Value Description
cfgdevset_id int
Configuration snap-in device set ID.
devset_name char (32)
Name of the set of devices to which the command will be sent.
domain char (32)
Domain name. Links to the domains table.
the_device image NULL Contains the collection of devices.
ref_count int
Reference count of the number of the command sets that link to the a device set.
description char (255)
A description of the device set.


Software Management Database Table

The software management tables consist of all the information required to perform the tasks for the Software Library Manager, Device Software Manager, and Software Inventory Manager applications.

Table C-36 is used for the software management tasks.

Table C-36 SysFiles Table File Structure

Field Name Field Type Field Value Description
file_id int
Software image file ID.
file_name varchar (128)
Software image file name.
rel_version char (32)
Software image file release version.
checksum int
Checksum of the software image.
length int
Size of the software image file.
platform char (32) NULL Platform type.
compressed tinyint NULL Whether the image file is compressed.
user_alias char (32) NULL User-provided name for the software image file.
comments text NULL Description or comments.
image_name char(32) NULL Description of image name.
image_family char(32) NULL Description of image file family.


Log Database Table

The ciscolog table stores data records on the following items. (See Table C-37.)

Table C-37 ciscolog Table File Structure

Field Name Field Type Field Value Description
msgid int
Message ID.
timestamp datetime
Date and time of message.
appl char (30)
CiscoWorks application that generated message.
device char (30) NULL Device that generated message or that the message is about.
event char (30) NULL Type of event.
netaddr char (30) NULL Network IP address.
text1 varchar (255) NULL Together the records in text1, text2, text3, and text4 fields contain the text of the log message.
text2 varchar (255) NULL Together the records in text1, text2, text3, and text4 fields contain the text of the log message.
text3 varchar (255) NULL Together the records in text1, text2, text3, and text4 fields contain the text of the log message.
text4 varchar (255) NULL Together the records in text1, text2, text3, and text4 fields contain the text of the log message.

HomeTOCPrevNextGlossSearchHelp
-

Copyright 1988-1995 © Cisco Systems Inc.