Convert Table Numbers to Table Names

All of the tbstat outputs refer to tables by tb1num, which is a hex number. In true, user-friendly fashion, OnLine uses an integer number to identify the tables in the systables system table. To convert between the two, you need to use the following SQL conversion:

SELECT tabname, hex(partnum) FROM systables;

This will give you a list of table names and tblnums (as used in tbstat) for all of your tables. The OnLine manual recommends that you keep a hard copy of this list available to use for debugging.

A somewhat better approach is to create the following script, table in your $INFORMIXLOCALBIN directory:

 joe 67> cat table #!/bin/csh set search = $2 set SEARCH = 'echo $2 | tr "[a-f]" "[A-F]" ' $INFORMIXDIR/bin/isql ...

Get Informix DBA Survival Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.