Creating new tables in the NCIM topology database
Create new tables in the NCIM database to hold the custom data that you want to discover.
About this task
If you create the NCIM database tables first, you can plan what you want to use the data for, before you configure how it is discovered.
Procedure
- Define the new table in NCIM by using the command line tool for your database, or ncp_oql.
-
Call the first field of the new table
entityID
and define the field as a foreign key to the entityData table.Defining theentityID
field in this way links the extra information about the entity to the main NCIM entity register. If the entity is removed from the entityData table, the data is also deleted from the custom table. - Restart Network Manager.
- Optional: Insert some example data into the new table and test if it is suitable for your purpose.
Creating new tables in different databases
The following example SQL statement shows how to create a custom table
exampleCustomData
in NCIM for Db2. The table used in the example is based on the
example dNCIM customisation defined in the createCustomization.sql file
supplied with Network Manager.CREATE TABLE exampleCustomData
(
entityId INTEGER NOT NULL,
slaId VARCHAR(255),
customerId VARCHAR(255),
customerContact VARCHAR(255),
CONSTRAINT example_cd_pk PRIMARY KEY (entityId),
CONSTRAINT excd_entData_fk FOREIGN KEY (entityId)
REFERENCES entityData(entityId) ON DELETE CASCADE
);
The following example SQL statement shows how to create a custom
table
exampleCustomData
in NCIM for Oracle. The table used in the example is based
on the example dNCIM customisation defined in the createCustomization.sql file
supplied with Network Manager.CREATE TABLE exampleCustomData
(
entityId NUMBER(10) NOT NULL,
slaId VARCHAR2(255),
customerId VARCHAR2(255),
customerContact VARCHAR2(255),
--
CONSTRAINT example_cd_pk PRIMARY KEY (entityId),
--
CONSTRAINT excd_entData_fk FOREIGN KEY (entityId)
REFERENCES entityData(entityId) ON DELETE CASCADE
);