| This reply contains two parts:
A. How to get the structure of the Export RDB from the existing file,
B. Some information about Export RDB structure.
A. How to get the structure of the Export RDB from the existing file:
You can get the structure of the Export RDB file using SQL ( I think there is
a way to get the same information using DECdecision but I do not know how to
do it):
SQL> declare schema filename <filespec>;
SQL> show tables;
SQL> show table <table name>;
where <filespec> is the file specification of the RDB file and <table name>
is the name of the table you are interested in.
B. Some information about Export RDB structure.
The following is a brief description of the database created by the
Exporter FM.
1. RDB file/Database name
The RDB file name (on VMS) and Database name (on Ultrix) are provided
by user by specifying the "export target" argument in the Export directive
or by using the default.
The default RDB file/Database name is as follow:
a. VMS - defined by logical MCC_EXPORT_RDB_NAME,
MCC_EXPORT.RDB if this logical is not defined;
b. Ultrix - defined by environmental variable
MCC_EXPORT_RDB_NAME, MCC_EXPORT_RDB if
this variable is not defined.
Note: On Ultrix Database other that MCC_EXPORT_RDB must be
created by SQL System Administrator.
2. Table types and names
There are two types of RDB tables supported by the Exporter FM:
a. - entity based table (EBT);
b. - partition based table (PBT).
Every row (record) in the EBT contents all information about the entity
and all of its attributes for the given time.
Every row (record) in the PBT contents identification information
about the entity and all of its attributes belong to this partition.
The following table shows how this types of the RDB tables are
supported by the different versions of the Exporter FM.
-------------------------------------
| Version | Table type |
-------------------------------------
| DECmcc V1.1 | EBT |
| DECmcc V1.2/VMS | EBT |
| DECmcc V1.2/Ultrix | PBT |
-------------------------------------
EBT name is constructed from the class name(s) of entity whose data
are exported preceded by prefix "MCC_". For example, a table name for
node4 entity is "MCC_NODE4"; for node4 line entity - "MCC_NODE4_LINE".
PBT name is constructed by appending a partition code to the
corresponding EBT name. For example, PBT which contents counters for
node4 line entity is "MCC_NODE4_LINE_3".
3 Structure of the RDB tables
Any record in both RDB tables can be logically divided into two parts:
1 - entity identification information and
2 - attribute information.
3.1 Entity identification information
Entity identification information is not depending on RDB table type
and contains from the following columns:
------------------------------------------------------------------------------
| Column name | MCC data type | Comment |
------------------------------------------------------------------------------
|"Time_Stamp" |MCC_K_DT_BIN_ABS_TIM |Schedule time |
| | | |
|<Entity class/subclass |defined by identifier|One column per subentity |
| presentation name> |returned from |level. The names of the |
| |SHOW entity ALL IDENT|columns are taken from |
| | |the data dictionary |
| | | |
|"MCC_EXPORT_SEQUENCE" |MCC_K_DT_LATIN1STRING|User defined string |
| | |(default EXPORT) |
| | | |
|"MCC_EXPORT_SEQUENCE_NUMBER"|MCC_K_DT_UNSIGNED32 |Reflect numbers of polls,|
| | |starting value is defined|
| | |by user(default 0) |
| | | |
|"MCC_Export_Poll_Status" *|MCC_K_DT_UNSIGNED32 |Indicates success/failure|
| | |of the current poll |
| | |(1 - data available; |
| | | 0 - data not available) |
| | | |
| | | |
|"MCC_EXP_Export_Time" *|MCC_K_DT_BIN_ABS_TIM |Time when record is |
| | |written in the table |
------------------------------------------------------------------------------
Note: * in column name indicates that this column is not available in
the DECmcc V1.1
3.2 Attribute information
Attribute information can be logically divided into attribute sections
containing information about a particular partition. Depending on the
table type attribute information contains information about one particular
partition (in the case of PBT) or all available partitions (in the case
of EBT).
An attribute section contains from the following columns:
------------------------------------------------------------------------------
| Column name | MCC data type | Comment |
------------------------------------------------------------------------------
|"Time_<presentation name of |MCC_K_DT_BIN_ABS_TIM |Presentation name is taken
| the partition>" | |from the dictionary. |
| | |Represents a time stamp |
| | |from the corresponding |
| | |mcc_call to get data. |
| | | |
|"MCC_EXP_CVR_<presentation *|MCC_K_DT_UNSIGNED32 |Indicates success/failure|
| name of the partition>" | |of the current poll |
| | |(1 - data available); |
| | | |
|"MCC_EXP_CVR1_<presentation*|MCC_K_DT_UNSIGNED32 |Additional information |
| name of the partition>" | |if returned CVR is an |
| | |exception |
| | | |
|"MCC_EXP_Time_Duration" *|MCC_K_DT_BIN_ABS_TIM |Time of computing the |
| | |duration for statistics |
| | |(only is statistics |
| | | partition is valid for |
| | | the specified entity) |
| | | |
|<presentation name of the |defined by data type |One column per attribute.|
| attribute> |of the attribute in |Presentation name is taken
| |the data dictionary |from the dictionary. |
------------------------------------------------------------------------------
Note:
1. "*" in column name indicates that this column is not available
in the DECmcc V1.1
2. See section 5 Name limitation.
4. Data type conversion
The following table represents the conversion of the MCC data types to
the the equivalent SQL data types:
-------------------------------------------------------------------------------
| | SQL data type | | |
| MCC data type |-----------------| SQL field length | Comment |
| | VMS | Ultrix | | |
|-----------------------------------------------------------------------------|
|MCC_K_DT_BOOLEAN |SMALLINT|SMALLINT| - | |
|MCC_K_DT_INTEGER8 |SMALLINT|SMALLINT| - | |
|MCC_K_DT_INTEGER16 |SMALLINT|SMALLINT| - | |
|MCC_K_DT_INTEGER32 |INTEGER |INTEGER | - | |
|MCC_K_DT_INTEGER64 |QUADWORD|INTEGER | - | |
|MCC_K_DT_UNSIGNED8 |SMALLINT|SMALLINT| - | |
|MCC_K_DT_UNSIGNED16 |INTEGER |INTEGER | - | |
|MCC_K_DT_UNSIGNED32 |QUADWORD|INTEGER | - | |
|MCC_K_DT_UNSIGNED64 |QUADWORD|INTEGER | - | |
|MCC_K_DT_COUNTER16 |INTEGER |INTEGER | - | |
|MCC_K_DT_COUNTER32 |QUADWORD|INTEGER | - | |
|MCC_K_DT_COUNTER48 |QUADWORD|INTEGER | - | |
|MCC_K_DT_COUNTER64 |QUADWORD|INTEGER | - | |
|MCC_K_DT_COUNTER16 |INTEGER |INTEGER | - | |
|MCC_K_DT_COUNTER32 |QUADWORD|INTEGER | - | |
|MCC_K_DT_ENUMERATION |QUADWORD|INTEGER | - | |
|MCC_K_DT_FILE_SPEC |CHAR |CHAR | 255 | |
|MCC_K_DT_LATIN1STRIN |CHAR |CHAR | 132 | |
|MCC_K_DT_SIMPLE_NAME |CHAR |CHAR | 255 |dns$k_simplestrmax
|MCC_K_DT_FULL_NAME |CHAR |CHAR | 512 |dns$k_fullstrmax |
|MCC_K_DT_VERSION |CHAR |CHAR | 12 | |
|MCC_K_DT_PHASE4NAME |CHAR |CHAR | 7 | |
|MCC_K_DT_PHASE4ADDRESS|CHAR |CHAR | 7 | |
|MCC_K_DT_REAL |FLOAT |FLOAT | - | |
|MCC_K_DT_BIN_ABS_TIM |TIME |DATE | - | |
|MCC_K_DT_BIN_REL_TIM |TIME |DATE | - | |
|MCC_K_DT_ADDRESS_DTE |CHAR |CHAR | 44 | |
|MCC_K_DT_ID802 |CHAR |CHAR | 17 | |
|MCC_K_DT_ID802_SNAP |CHAR |CHAR | 14 | |
|MCC_K_DT_ID802_SAP |CHAR |CHAR | 2 | |
|MCC_K_DT_IDENETV2_TYPE|CHAR |CHAR | 5 | |
|MCC_K_DT_IPADDRESS |CHAR |CHAR | 15 | |
|MCC_K_DT_INTERNET_NAME|CHAR |CHAR | 255 | |
-------------------------------------------------------------------------------
5 Name limitation
Due to the SQl limitation column and table names can not be longer
that 31 symbols on VMS and 23 symbols on Ultrix. Ultrix SQL has an additional
limitation on the number of columns in each table (not more that 127).
The column and table names are abbreviated by truncating the longest
words of the presentation name until the overall name is of the required
length.
6 Data processing
When Exporter FM creates a table for a specified entity it uses the
data dictionary to define all valid attributes for a specified entity class.
It creates a column in the table for each valid attribute.
Every time when Exporter FM writes data in the table it writes only
data received from the mcc_call "Show <entity> all <partition>". If not all
attributes are returned the corresponding columns in the table will be empty.
In the case if returned data type of the attribute is different from the
data type defined in the data dictionary the corresponding column will be
empty.
|
| Hi,
Thank you for the information regarding RDB record layout. However, I
also would like to find out if I can provide this information to our
customer since they are looking for writing the reporting interface
using 4GL programing language instead of the reporting package that
we offered with the BMS package. Thanks again for your information.
Thien
|