MIB Smithy

  1. Up to Table of Contents

Creating Records and Databases

The new subcommand is used to create records of the specified type within the database identified by the database command. If no record type is specified, the new command creates a new database. Each database, including the master database, can be used to create new, empty databases.


% dbcmd new ?recordType? ?option value ...?


is the name of the database;
is an optional record type; and
option value
are paired values, same as those supported by the set command for the specified record type, which may be present to configure the record at creation time.


  • Fully-qualified name of the created record.

Common Properties

-name name
The -name property, which is allowed for all record types except files and databases themselves, is used to specify the name of the new record. If no name is specified, the SDK will automatically assign a name that is guaranteed to be unique within the database.
-in record
The -in property is used to specify the parent/container record where appropriate. If the -in property is not specified, the location of the created record may be indeterminate, but is usually in the last appropriate container that was created, if any. (For example, creating a module record without specifying the file to create it in results in the module being placed within the last created file.) An error will result if no appropriate container exists (for example, attempting to create a conformance module if there are no conformance records).

Specifying Record Types

The values accepted for the recordType property are:

Create a new AGENT-CAPABILITIES record.
Create a new GROUP record within a MODULE-COMPLIANCE Module.
Create a new Conformance Module record in an AGENT-CAPABILITIES (INCLUDES) or MODULE-COMPLIANCE (MODULE) record.
Create a new MODULE-COMPLIANCE record.
Create a new File record.
Create a new Module record.
Create a new MODULE-IDENTITY record.
Create a new OBJECT-IDENTITY or OID Value Assignment.
Create a new Type Assignment or TEXTUAL-CONVENTION.
Create a new NOTIFICATION-GROUP record.
Create a new NOTIFICATION-TYPE or TRAP-TYPE record.
Create a new OBJECT-TYPE record.
Create a new OBJECT-GROUP record.
Create a new Variation in a Conformance Module.

See Also

Example 1 - Creating a new database:

% set db [smilib new]

Example 2 - Creating a new file:

% set file [$db new -file]

Example 3 - Creating a new module:

% set module [$db new -module -name EXAMPLE-MIB -in $file]
  1. Up to Table of Contents