ubinfo – table information


ubinfo -[Y* a d f h i k l m# p* r s u v] <table>


ubinfo provides useful information about a table. It’s main use is in shell scripts or by system administrators.


-a Print all associations for table.
-d debug output.
-f Print the field names for this table.
-h Print Help message. When used in conjunction with the -f flag, the help message for each field is printed after each field name. If -f is not given the help message for the table is printed.
-i Interactive browsing of the key structures.
-k Print the keys for this table. Unique keys indicated by a “*”.
-l Print the length in bytes of the stored record.
-m level number Print the map of associations from this table. This is printed as a tree.

Alias tables are shown as “alias,real”.

Foreign keys are indicated by a “+” after the name that starts the loop.

The tree height can be limited by setting the level to any number > 0 and then only a tree of height level will be printed. If level is 0 then the tree height is not restricted.

-p target text Print the most direct path from table to target. This is not necessarily the path that UNIBASE will use in any given circumstance as there may be multiple paths, but it is the first choice if there is no better reason to use another.
-r This option will print the number of active records in a UNIBASE table.
-s Print next sequence number. This is the number that the next new record will get if it has a sequence (S) type field.
-u Print the % usage of the file. This is the number of active records as a percentage of the total records allocated. As there is some system space at the start of a file this will never be 100%.
-v Verify the table structure. This option causes ubinfo to do the same consistency checks as are done whenever a table is opened. If the table structure is correct, it will print “OK”.
-Y dictionary text Use dictionary as an alternative data dictionary.



ubinfo-r stock

Will print the number of records in the table stock.