loverVC 发表于 2004-05-26 22:25

informix sysmaster表详解,来论坛这么久了,算是尽微薄之力。

不详的地方,欢迎大家继续添砖加瓦。我也是从书中收集起来。
一、实例信息
*sysconfig         ————>;         onconfig文件
*sysprofile        ————>;        服务器统计信息
*syslog                ————>;        逻辑日志
*sysvpprof        ————>;        虚拟处理器
create table "sysmaster".sysconfig        {服务器配置参数}
(
cf_id          integer,   {唯一数字标志符                }
cf_name          char(18),{onconfig参数名                }
cf_flags    integer,   {标志,0=在视图中                }
cf_originalchar(256), {启动时在onconfig中的值        }
cf_effective char(256), {实际使用的值                }
cf_default   char(256){onconfig文件中不指定时默认使用的值        }
);
grant select on sysconfig to public;

create table "sysmaster".sysprofile        {服务器概貌信息}
(
name        char(13),        {概貌元素名        }
value        integer           {当前值                }
);
grant select on sysprofile to public;

create table "sysmaster".syslogs        {逻辑日志信息}
(
number        smallint, {日志文件号                }
uniqid         integer,{日志文件唯一ID        }
size                integer,{日志文件页                }
used                integer,{日志文件使用的页        }                       
is_used        integer,{1为已用,0为未用        }
is_current        integer,{1为当前                }
is_backed_up        integer,{1为备份                }
is_new        integer,{1为新                }
is_archived        integer,{1为存档                }
is_temp        integer,{1为临时                }
flags           smallint{日志文件标志                }
);
grant select on syslogs to public;

create table "sysmaster".sysvpprof        {虚处理器信息与统计}
(
vpid                integer, {虚拟处理器                        }
class                char(50, {虚拟处理器类名(cpu, adm, lio, pio等)}
usercpu        float,   {用户时间unix秒数                        }
syscpu        float    {系统时间unix秒数                        }
);
grant select on sysvpprof to public;

二、dbspace与块信息
*sysdbspaces        ————>;        dbspace
*syschunks        ————>;        块
*syschkio        ————>;        块I/O
*syschfree        ————>;        块自由空间        注:syschfree是个不支持的表

create table "sysmaster".sysdbspaces        {dbspace配置}
(
dbsnum        smallint, {dbspace号                }
name                char(18), {dbspace名        }
owner                char(8),{dbspace拥有者        }
fchunk        smallint, {dbspace第一块                }
nchunks        smallint, {dbspace块数                }                          
is_mirrored        integer,{dbspace是否镜像 1=YES,0=NO}
is_blobspace        integer,{dbspace是否大对象空间        }
is_temp        integer,{dbspace是否临时,1=YES,0=NO        }
flags                smallint{dbspace标志                }
);
grant select on sysdbspaces to public;

create table "sysmaster".syschunks        {chunk配置}
(
chknum        smallint, {chunk号                        }
dbsnum        smallint, {dbspace号                        }
nxchknum        smallint, {dbspace中下一个块号        }
chksize        integer,{chunk中的页                        }
offset        integer,{设备页偏移量                        }
nfree                integer,{块中未用页数                }                          
is_offline        integer,{chunk是否脱机,1=YES,0=NO}
is_recovering        integer,{chunk是否恢复,1=YES,0=NO}
is_blobchunk        integer,{chunk是否blobchunk,1=YES,0=NO}                          
is_inconsistent integer,{chunk是否不一致,1=YES,0=NO        }
flags                smallint, {由bitbal转换的块标志                }
fname                char(128),{设备路径名                }                          
mfname        char(128),{镜像设备路径名                }
moffset        integer,{镜像设备偏移量                }
mis_offline        integer,{镜像是否脱机,1=YES,0=NO        }
mis_recovering integer, {镜像是否恢复,1=YES,0=NO        }
mflags        smallint{镜像块标志                        }
);
grant select on syschunks to public;

create table "sysmaster".syschfree        {显示块中的未用空间块}
(   
chknum        integer,        { chunk number              块号   }
extnum        integer,        { extent number        in chunk 块区域号   }
start           integer,        { physical addr of start 开始物理地址 }
leng            integer                { length of extent       区域长度   }       
);
create unique index syschfreeidx on syschfree (chknum, extnum);
revoke all on syschfree from public;
grant select on syschfree to public;

create table "sysmaster".syschkio        {块设备I/O统计信息}
(
chunknum        smallint, {块号                }                          
reads                integer,{读操作数        }
pagesread        integer,{读页数        }                                                    
writes        integer,{写操作数        }
pageswritten        integer,{写页数        }                          
mreads        integer,{镜像读操作数        }
mpagesread        integer,{镜像读页数        }                          
mwrites        integer,{镜像写操作数        }
mpageswritten        integer   {镜像写页数        }
);
grant select on syschkio to public;

三、数据库与表信息
*sysdatabases        ————>;        数据库
*systabnames        ————>;        表
*sysextents        ————>;        表区域
*sysptprof        ————>;        表I/O

create table "sysmaster".sysdatabase        {实例中所有的数据库信息}
(
name                char(18), {数据库名                        }
partnum        integer,{systables表ID                }
owner                char(8),{生成者用户名                }
created        integer,{生成日期                        }
is_logging        integer,{无缓冲日志,1=YES,0=NO        }
is_buff_log        integer,{缓冲日志,1=YES,0=NO        }
is_ansi        integer,{ANSI方式数据库1=YES,0=NO        }                             
is_nls        integer,{NLS支持,1=YES,0=NO                }
flags                smallint{指示日志的标志                }
);
grant select on sysdatabase to public;

create table "sysmaster".systabnames        {实例中的所有表}
(
partnum        integer,        { table id for table                 表号        }
dbsname        char(18),        { database name        数据库名}
owner                char(8),        { table owner        表拥有者        }
tabname        char(18),        { table name         表名        }
collate       char(32)      { collation assoc with database 与GLS的相关性        }
);
create unique index systabs_pnix on systabnames(partnum);
revoke all on systabnames from public;
grant select on systabnames to public;

create table "sysmaster".sysextents        {实例中的表和每个区域}
(
dbsname        char(18), {数据库名                }
tabname        char(18), {表名                        }
start                integer,{这个区域的物理地址        }
size                integer   {这个区域的长度(页数)        }
);
grant select on sysextents to public;

create table "sysmaster".sysptnext        {区域的信息}
(
pe_partnum         integer,        { partnum for this partition        这个区域的编号                }
pe_extnum        smallint,        { extent number                        区域号                        }
pe_phys         integer,        { physical addr for this extent        这个区域的物理地址        }
pe_size         integer,        { size of this extent                这个区域的长度(页数)        }
pe_log        integer                { logical page for start        开始逻辑页                }
);
create unique index sysptnextidx on sysptnext (pe_partnum, pe_extnum);
revoke all on sysptnext from public;
grant select on sysptnext to public;

create table "sysmaster".sysptprof        {表I/O概貌}
(
dbsname        char(18),         {数据库名}
tabname        char(18),         {表名    }
partnum        integer,         {表编号}
lockreqs        integer,         {锁请求}
lockwts        integer,         {锁等待}
deadlks        integer,         {死锁    }
lktouts        integer,         {锁超时}
isreads        integer,         {读      }
iswrites        integer,         {写入    }
isrewrites        integer,         {改写    }
isdeletes        integer,        {删除    }
bufreads        integerinteger,        {缓冲区读}
bufwrites        integer,         {行冲区写}
seqscans        integer,         {顺序扫描}
pagreads        integer,        {磁盘读}
pagwrites        integer                {磁盘写}
);
grant select on sysptprof to public;

四、用户对话信息
*syssessions        ————————>;        对话数据
*syssesprof        ————————>;        用户统计信息
*syslocks                      ————————>;        用户锁
*syseswts        ————————>;        等待时间

create table "sysmaster".syssessions        {用户对话与连接信息}
(
sid                integer, {对话号                        }
username        char(8), {用户名                        }
uid                smallint,{用户unix号                        }
pid                integer, {用户进程号                        }
hostname        char(16),{主机名                        }
tty                char(16),{tty端口                        }
connected        integer, {用户连接时间                }
feprogram        char(16),{程序名                        }
pooladdr        integer, {专有对话池指针                }
is_wlatch        integer, {标志1=YES,0=NO,等待锁存        }
is_wlock        integer, {标志1=YES,0=NO,等待锁        }
is_wbuff        integer, {标志1=YES,0=NO,等待缓冲区        }
is_wckpt        integer, {标志1=YES,0=NO,等待校验点        }
is_wlogbuf        integer, {标志1=YES,0=NO,等待日志缓冲区}
is_wtrans        integer, {标志1=YES,0=NO,等待事务        }
is_monitor        integer, {标志1=YES,0=NO,监视进程        }
is_incrit        integer, {标志1=YES,0=NO,在关键段中        }
state                integer{标志                        }
);
grant select on syssessions to public;

create table "sysmaster".syssesprof        {用户对话性能统计}
(
sid                integer,           {对话号                }
lockreqs        decimal(16,0),    {请求的锁                }
locksheld        decimal(16,0),    {锁保持        }
lockwts        decimal(16,0),    {锁等待                 }
deadlks        decimal(16,0),    {发现的死锁                }
lktouts        decimal(16,0),    {死锁超时                }
logrecs        decimal(16,0),    {逻辑日志记录写入        }
isreads        decimal(16,0),    {读                        }
iswrites        decimal(16,0),    {写                        }
isrewrites        decimal(16,0),    {改写                }
isdeletes        decimal(16,0),    {删除                }
iscommits        decimal(16,0),    {提交                }
isrollbacks        decimal(16,0),    {撤销                }
longtxs        decimal(16,0),    {长事务                }
bufreads        decimal(16,0),    {缓冲区读                }
bufwrites        decimal(16,0),    {缓冲区写                }
seqscans        decimal(16,0),    {顺序扫描                }
pagreads        decimal(16,0),    {页读                }
pagwrites        decimal(16,0),    {页写                }
total_sorts        decimal(16,0),    {总排序                }
dsksorts        decimal(16,0),    {磁盘排序                }
max_sortdiskspacedecimal(16,0),{排序使用的最大空间        }
logspused        decimal(16,0),    {当前使用的日志字节        }
maxlogsp        decimal(16,0)   {逻辑日志使用的最大空间}
);
grant select on syssesprof to public;

create table "sysmaster".syslocks        {服务器上的锁活动}
(
dbsname        char(18), {数据库                }
tabname        char(18), {表名                        }
rowidlk        integer,{索引关键字锁的行号        }
keynum        smallint, {索引关键字锁的关键字号}
type                integer,{锁拥有者对话ID        }
owner                integer,{第一个等待者对话ID        }
waiter        char(4)   {锁类型                }
);
grant select on syslocks to public;
{*******************************************************
注:锁类型包括
*B        ——————>;byte lock(字节锁)
*IS        ——————>;intent shared lock(意图共享锁)
*S        ——————>;shared lock(共享锁)
*XS        ——————>;repeatable read shared key(可重复读共享锁)
*U        ——————>;update lock(更新锁)
*IX        ——————>;intent exclusive lock(意图独占锁)
*SIX        ——————>;shared intent exclusive(共享意图独占锁)
*X        ——————>;exclusive lock(独占锁)
*XR        ——————>;repreatable read exclusive(可重复读独占锁)
基本说来,这些锁类型是三种锁的组合:共享锁(S)、独占锁(X)、更新锁(U)。共享锁使其他用户也能读数据,但不能改变数据。独占锁不让其他用户共享数据。
更新锁在更新数据时不让其他用户改变数据。
IDS中可以锁定的对象包括:
*数据库        ——————>;每个用户打开数据库时即对数据库采用共享锁,防止别人删除正在使用的数据。这个操作显示为sysmaster数据库和sysdatabase表中的锁,rowid指向包含数据库名的记录。
*表        ——————>;表锁显示为表上的锁,rowid为0,keynum为0。
*页        ——————>;页锁显示为rowid以00结尾,即页中的所有行均锁定。
*行        ——————>;行锁显示实际rowid(不以00结尾)。
*键        ——————>;键锁显示为keynum如果行的索引需要更新,则锁在该行的索引。
********************************************************}

create table "sysmaster".sysseswts        {对象等待状态与时间}
(
sid                integer,{对话ID               }
reason        char(50), {等待原因说明               }
numwaits        integer,{这个原因的等待数       }
cumtime        float,    {这个原因的等待累计时间}
maxtime        integer   {这个原因的等待最长时间}
);
grant select on sysseswts to public;

五、不支持的表(没有建档,可能在将来版本中改变)

create table "sysmaster".systrans        {用户事务}
(
tx_id                integer,{事务表指针                   }
tx_logbeg        integer,{事务开始的逻辑日志号           }
tx_loguniq        integer {事务中使用的当前逻辑日志号}
);
grant select on systrans to public;

create table "sysmaster".syssqexpalin        {用户查询}
(
sqx_sessionid                integer, {SQL语句的对话ID,匹配onstat -u 输出        }
sqx_bufreads                integer, {SQL语句完成的缓冲区读次数}
sqx_pagereads                integer, {SQL语句完成的页面读次数}
sqx_totsorts               integer, {SQL语句完成的排序次数}
sqx_estcost                integer, {这个查询的估计成本,应与SET EXPLAIN的输出相同。注:这个成本有时偏高,但可以作为寻找坏查询的参考}
sqx_estrows                integer, {检查这个查询返回的行,应与SET EXPALIN的输出相同}
sqx_seqscan                smallint,{查询是顺序表格扫描时返回1,通常表示有问题}
sqx_srtscan                smallint,{查询是排序扫描时返回1}
sqx_autoindex                smallint,{查询是表格自动索引时返回1}
sqx_mrgjoin                smallint,{查询是合并连接时返回1}
sqx_dynhashjoin        smallint,{查询是动态散列连接时返回1        }
sqx_sqlstatement        char(32000){SQL语句文本                }
);
grant select on syssqexplain to public;

czw1413_cn 发表于 2004-05-27 08:41

informix sysmaster表详解,来论坛这么久了,算是尽微薄之力。

8错

mywg 发表于 2004-05-27 09:08

informix sysmaster表详解,来论坛这么久了,算是尽微薄之力。

佩服!

amiescort 发表于 2004-05-27 21:43

informix sysmaster表详解,来论坛这么久了,算是尽微薄之力。

楼主辛苦了,顶

dintan 发表于 2004-05-28 18:07

informix sysmaster表详解,来论坛这么久了,算是尽微薄之力。

UP 收下!

牵手 发表于 2004-05-30 16:57

informix sysmaster表详解,来论坛这么久了,算是尽微薄之力。

辛苦,多谢

admirer 发表于 2004-05-30 18:25

informix sysmaster表详解,来论坛这么久了,算是尽微薄之力。

干得好!

loverVC 发表于 2004-05-30 21:13

informix sysmaster表详解,来论坛这么久了,算是尽微薄之力。

呵呵,应该的,我在informix数据库目录下找的,再配合书上打出来的。能够为CU出一份力,是每个CU成员应尽的义务。。。

ty8810 发表于 2004-06-04 23:43

informix sysmaster表详解,来论坛这么久了,算是尽微薄之力。

syssessions的用处有点意思

kendeychen 发表于 2004-06-05 10:01

informix sysmaster表详解,来论坛这么久了,算是尽微薄之力。

看不懂,还是顶
页: [1] 2 3
查看完整版本: informix sysmaster表详解,来论坛这么久了,算是尽微薄之力。