天融信ids配置_使用IDS配置和使用OpenAdmin工具
IBM Informix Dynamic Server具有许多功能,可满足包括开发人员和管理员在内的各种用户组的需求。 IDS的强大功能之一是管理成本低。 IDS以免提管理而闻名。 为了使服务器管理更加容易,IDS用户现在可以使用一种名为OpenAdmin Tool(OAT)的新的开源,独立于平台的工具。 OAT包括用于管理任务和性能分析工具的图形界面。 它是IBM Informix Dynamic Server版本11.10引入的,它是一个基于PHP的Web浏览器管理工具,使您能够从一个位置管理多个数据库服务器实例。 OAT的一些非常有用的功能包括SQL资源管理器,会话资源管理器,任务计划程序,健康中心,空间管理,服务器管理等等。 除了OAT提供的内置功能外,用户还可以轻松插入自己的扩展程序以创建所需的功能。 本文重点介绍了OAT的一些非常有用的功能,并可以帮助您入门。
先决条件
OAT要求安装以下产品。 括号中的版本表示已测试OpenAdmin工具的版本。 图1显示了这些产品如何支持OAT。
- Web服务器(Apache 2.2.6)
- IBM Informix I-Connect或IBM Informix Client SDK(3.00)
- PHP 5.2.4(最低要求),使用PDO,PDO_SQLITE,GD和SOAP启用编译(5.2.4)
- Informix PDO模块
图1. OpenAdmin工具栈
您可以在工具随附的自述文件中找到OpenAdmin工具的安装说明(请参阅参考资料 )。
登录并连接到IDS服务器
安装完成后,请转到OAT根URL(例如,http:// SERVERNAME / LOCATION,其中SERVERNAME是运行Web服务器的服务器的名称,LOCATION是OAT在Web服务器文档根目录中的位置提取OAT的tar或zip的目录)。 图2显示了登录屏幕:
图2.登录屏幕
登录屏幕的左上角有两个单选按钮,“登录”和“管理”。 默认为登录名。 组字段是一个包含连接组名称的列表框。 您可以使用默认组,也可以具有所有服务器连接所属的用户定义的组。 组的配置,服务器的详细信息及其密码都可以通过选择“ 管理”单选按钮时提供的选项来进行设置。
该屏幕上的“获取服务器”按钮将弹出一个列表框,其中包含属于所选组的所有服务器连接。 选择填充在屏幕右侧的框。 现在,您可以通过单击屏幕右侧的“ 登录”按钮来开始使用选定的服务器连接。
选择“ 管理”单选按钮可将您切换到“管理”屏幕。 管理员屏幕提供了用于配置OAT,管理连接等的选项。
图3.打开Admin菜单
OAT Config选项
在“打开管理”菜单中,选择“ OAT配置”以设置启动和运行OAT所需的参数。 图4说明了OAT配置屏幕。
图4.配置屏幕
在此屏幕上,可以设置以下参数:
表1.配置参数
预设语言 | 默认情况下,语言为英语。 为用户提供了切换到德意志的选项 |
---|---|
基本网址 | 用户用来打开OAT管理控制台的URL |
安装目录 | 安装后放置所有特定于OAT的文件和文件夹的位置 |
连接数据库位置 | 存储为与服务器建立连接而提供的数据库详细信息 |
手指间隔 | 可以根据需求和环境设置值。 默认值为300 |
IDS协议 | 可以在onsoctcp和ontlitcp之间选择协议。 (onsoctcp是默认值)。 |
管理连接:
使用“管理连接”,您可以添加组,添加连接或查看连接管理员。
- 新增群组
在“管理连接”下,选择“ 添加组” 。 您的屏幕应该与图5相似。
图5.添加一个新组
要添加IDS服务器组,请提供您选择的服务器组名称和服务器组密码。 如果选择“ 只读” ,它将禁用该组中定义的所有服务器在OAT中的任何管理特权(例如,添加块)。 确定是否将该组标记为“只读”,然后单击“ 添加”以确认并添加该组。
- 添加连接
需要以下参数才能添加新的IDS服务器连接。
表2.添加IDS服务器连接的参数
参数 | 描述 |
---|---|
组 | 每个服务器连接都是已定义组的一部分。 如果未选择任何组名,则新服务器连接将成为“默认”组的一部分。 |
用户名 | IDS服务器所在主机的用户名 |
密码 | 特定于各自用户名的密码 |
Informix服务器 | IDS服务器实例名称 |
主机名 | 托管IDS服务器的主机的名称 |
港口 | IDS服务器专用的端口号 |
属性 | 在这里,决定是在当前日志之后添加逻辑日志,还是在日志末尾添加逻辑日志 |
纬度,经度和IDS端口的值有助于在地图上定位Informix服务器。
选择测试连接按钮以测试您的连接。 如果针对该参数提供的任何值都不正确,或者服务器已关闭,则用户可能会看到以下错误消息。
图6.示例连接错误
如果Informix服务器正在运行且值正确,则表示建立成功连接。 您将获得一条成功消息,显示为“ online”,如图7所示。
图7.示例连接成功消息
成功测试此新连接后,单击“ 保存”将连接添加到所选的相应组中。
- 连接管理员
Connection Admin(图8)使您可以删除不再需要的组。 通过单击组名称旁边的复选框来选择要删除的组,然后选择“ 删除” 。 这将删除整个组和其中配置的连接。 在管理员具有多个要管理的组的情况下,此操作有效。
图8. Connection Admin屏幕
OAT登录
此选项链接回到前面解释的OAT登录屏幕。 或者,您可以直接单击“ 登录”以进入OAT登录屏幕。
保健中心
此功能使您对系统和服务器的运行状况有一个总体印象。 健康中心由警报和仪表板组成。
警报
如果单击Health Center > 警报 ,您将看到类似于图9的屏幕。您可以选择要查看的警报的严重性,警报类型和状态。 还可以选择以不同的颜色显示不同类型的警报,以提高可见性和清晰度。
图9.健康中心警报
管理仪表板
如果选择“ 仪表板”作为选项,则将获得有关系统相关信息的参考屏幕。 仪表板选项为您提供了两个选项卡,可从---默认或空间中选择。 Default选项卡(图10)显示了系统上的当前内存消耗和与事务相关的信息,而Space选项卡(图11)包含有关dbspace和锁使用情况的信息。
图10. Health Center仪表板-默认
图11.健康中心仪表板-空间
日志
此功能可帮助您查看与数据库服务器相关的不同日志,并由admin命令,在线消息和OnBar活动组成。
- 管理员命令
如果选择Admin命令选项,将得到类似于图12的屏幕,该屏幕列出了通过dbcorn调度的不同命令的执行状态。
图12.管理员命令
- 在线留言
如果选择“ 在线消息”选项,则会显示数据库服务器在线日志中的内容(图13)。 错误和警告消息分别以红色和黄色显示。
图13.在线消息
- OnBar活动
如果选择OnBar activity ,那么将显示来自上述文件的内容到数据库服务器的配置变量BAR_ACT_LOG(图14)。 通过OnBar实用程序实施备份时,将生成此日志。 错误和警告消息分别以红色和黄色显示。
图14. OnBar活动日志
任务计划程序
OAT的任务计划程序功能使您可以在预定义的时间或由服务器内部确定的时间来管理和运行计划的维护,监视和管理任务。 您可以监视活动(例如,检查可用日志空间)并创建自动纠正措施。 调度程序功能使用基于SQL的管理系统和一组任务来收集信息并监视和调整服务器。
任务计划程序由任务定义和驱动。 sysadmin数据库是一个已记录的数据库,其中包含存储任务计划程序信息的表。 缺省情况下,仅授予Informix用户访问sysadmin数据库的权限。 任务属性存储在sysadmin数据库的ph_task表中。 该表中的每一行都是一个单独的任务,每一列都是一个任务属性。 您可以修改任务属性,并可以通过在表中插入行来设置新任务。 PH_RUN,PH_ALERT,PH_THRESHOLD,PH_GROUP是与任务计划相关的其他一些表。 要了解有关这些表的更多信息,请参阅参考资料 。
OAT中的Task Scheduler已分为三部分-调度程序,任务详细信息和任务运行时-如图15所示。
图15.任务计划程序
- 排程器
Dynamic Server中的调度程序包含下表中显示的任务。 您可以使用任务计划程序提供的任务计划程序向导修改这些任务并设置新任务。 表3显示了修改和设置新任务所需的参数。
表3. Task Scheduler中的参数
参数 | 描述 |
---|---|
mon_command_history | 清除命令历史记录表 |
mon_config | 将所做的所有更改保存在ONCONFIG文件中 |
mon_config_startup | 在每次服务器启动时保存ONCONFIG文件 |
mon_sysenv | 跟踪数据库服务器启动环境 |
mon_profile | 保存服务器配置文件信息 |
mon_vps | 收集虚拟处理器信息 |
mon_checkpoint | 保存有关检查点的信息 |
mon_memory_system | 监视服务器内存消耗 |
mon_table_profile | 保存表配置文件信息,包括此表上发生的更新,插入和删除的总数 |
mon_table_names | 保存表名及其创建时间 |
mon_users | 保存有关每个用户的个人资料信息 |
check_backup | 检查以确保备份已运行 |
ifx_ha_monitor_log_reply_task | 监视HA辅助日志重播位置 |
警报清除 | 从系统中删除所有旧警报条目 |
post_alarm_message | 发布警报的系统功能 |
自动更新统计评估 | 评估哪些列和表应刷新统计信息和分布 |
自动更新统计信息刷新 | 刷新评估者建议的统计数据和分布 |
图16. Scheduler屏幕
单击“ 添加新任务”按钮 ,使用“任务计划程序”向导定义新任务。
图17.任务计划程序向导
调度程序任务有两种类型,任务和传感器。 如前所述, 任务提供了在特定时间或间隔运行特定作业的方法。 可以定义一个传感器来收集和保存信息。 如果选择了“仅在服务器启动时运行”,则仅在服务器启动时执行任务。
提供任务名称,任务组(例如DISK,NETWORK,CPU,BACKUP等)以及新任务的描述。 单击下一步 。 图18显示了这些步骤。
图18.新任务设置
现在,要求您指定新任务的时间表,如图19所示。 输入开始和停止时间以及任务的频率。 单击下一步 。
图19.新任务的时间表
为了指定新任务应运行的命令,请在此处输入由分号或用户定义的函数分隔的多个SQL语句,该语句在每次任务运行时执行。
图20.由新任务运行的命令
任务计划程序向导的最后一个屏幕显示新任务的摘要,要求确认值。 确认此信息后,将创建一个新任务。
使用任务计划程序向导创建传感器:
如前所述,DBA可以使用传感器来累积服务器数据,以维护服务器上的活动历史记录。 任务计划程序向导可用于创建传感器。 系统将提示您输入传感器名称,传感器组,新传感器的说明,开始时间,停止时间和频率,类似于新任务。
请注意,要创建传感器,还有一个附加的输入字段--数据删除-带有几天,几小时和几分钟的空格。 无论何时执行传感器,收集到的数据都会存储在用户定义的表中,该表在创建传感器时创建。 数据删除指定从该表中删除数据的时间间隔。 根据DBA要维护的数据历史记录的种类,应该设置此数据删除间隔。 您必须提供一个SQL命令,该命令应在传感器执行时执行,类似于用户为任务提供的命令。 成功完成这些步骤后,该新传感器将显示在任务表中。
- 任务详情
输入传感器的所有信息后,您可以查看任务详细信息屏幕,如图21所示。
图21.任务详细信息屏幕
顶级“任务详细信息”屏幕显示所有任务及其组,描述,下一次执行时间和频率。 在屏幕顶部,“分组以查看”框允许您选择所有特定任务。 例如,如果选择CPU作为要查看的组,则表中仅显示mon_vps任务。 要了解有关特定任务的更多信息或更改特定任务的参数集,应单击出现在“名称”列下的任务名称。 可以看到带有特定任务详细信息的新屏幕。
图22显示了特定任务的详细信息屏幕的视图:
图22.单个任务详细信息屏幕
- 任务运行时
任务运行时为每个任务提供运行摘要。 摘要表提供了诸如发生的执行次数,每次执行花费的平均时间,所有执行花费的总时间以及每个任务的最后运行时间等信息。 图23显示了示例任务运行时屏幕
图23.任务运行时屏幕
您可以查看任务的更多详细信息,并且可以通过单击“名称”列下的任务名称来更改任务。 任务参数是一个额外的部分,当您从“任务”运行时导航到单个任务时可以看到。 有一个名为ph_threshold的sysadmin表,用于存储调度程序任务的阈值。 当达到阈值时,任务可以决定采取其他措施。 任务参数引用这些阈值。 阈值本质上是任务的参数。 图24显示了一个带有两个参数的“ check_backup”系统定义任务的示例。 仅当ph_threshold表中存在特定任务的条目时,任务参数部分才会在OAT中显示。
图24.任务参数
太空管理
空间管理类别进一步分为三个子类别,即:
- 数据库空间
- 大块
- 恢复日志
数据库空间
在向您介绍dbspace及其用途之前,我们首先要向您介绍可以使用OAT创建的空间的类型。
可用空间的类型为:
- dbspace : dbspace是一个逻辑单元,可以包含1到32,766之间的块。 将数据库,表,逻辑日志文件和物理日志放置在dbspace中。 dbspace包含一个或多个块。
- 临时数据库空间:临时数据库空间是专门为存储临时表而保留的数据库空间。 数据库服务器清除自上次关闭数据库服务器以来可能剩余的所有表。
- Blobspace:Blobspace是一个逻辑存储单元,由一个或多个仅存储TEXT和BYTE数据的块组成。 您可以将与不同表(请参阅表)关联的TEXT和BYTE列存储在同一Blob空间中。
- 智能大对象空间(sbspace):智能大对象空间是一个逻辑存储单元,由一个或多个存储智能大对象的块组成。 智能大对象由字符大对象(CLOB)和二进制大对象(BLOB)数据类型组成。 用户定义的数据类型也可以使用智能大对象空间。
数据空间/ BLOB空间-由图形和统计表示:
图25描绘了不同类型的dbspace(数据空间,TEMP空间和BLOB空间)对空间利用的图形和统计表示。 上半部分代表图形,下半部分代表数据。
图25. DATA-BLOB空间的图形和统计表示
下面的dbspaces表突出显示了以下内容:空间的名称,空间的类型(dbspace或blobspace),它们的状态,总大小,可用空间量,消耗的空间百分比,空间分散通过的块数,以及每个页面的大小。
图26. dbspaces内容表
在您的环境中,如果存在大量现有的dbspace,则为了查看它们的详细信息,可以使用表顶部的可用下拉菜单(在OAT的图形下方)控制台),方法是选择页码。 该表右上角的选项ALL(同样,在OAT控制台的图形下方)将所有现有的dbspaces转储到给定的页面上,从而可以在一个页面中查看所有内容。
创建一个空间
在dbspaces表下,可以使用“创建空间”部分下提供的选项创建新空间。 图26是快照,描述了创建空间的选项。
图27.创建一个空间
您所要做的就是提供以下参数,然后单击创建 。
表4.用于创建新空间的参数
参数 | 描述 |
---|---|
名称 | 必须创建的空间的名称 |
路径 | 您决定新空间将驻留的路径位置 |
抵消 | 需要在此处提及空间偏移(如果有) |
尺寸 | 所需空间的大小,取决于需求和可用性。 |
类型 | 您要创建的空间类型--- dbspace,temp dbspace,blobspace和smart blobspace |
如果成功创建了空间,则会在dbspace图上方显示以下消息。
图28.成功创建的dbspace
注意:要创建的空间的名称应附加到路径文本字段中提供的路径上。 例如,如果名称为“ myspace”,则路径应类似于“ / usr2 / IDS1150 / data / myspace”。
如果未正确指定路径,则将在dbspace图的顶部看到类似于图29中的错误消息。
图29.创建dbspace时的错误消息
为了知道空间利用率如何在dbspace中分配,您可以单击dbspaces表中列出的任一dbspace。 该操作将进一步显示四个选项卡:“摘要”,“管理”,“表”和“范围”。
- 摘要
“摘要”选项卡根据统计信息和图形提供有关所选数据库空间的信息。 dbspace信息以页面为单位提供。 您将在表“ Dbspace信息”中找到统计信息,在右侧,注意饼图显示了数据库空间的使用方式。
dbspace信息涵盖了诸如dbspace的名称,它的所有者,dbspace的创建时间,页面大小,数据覆盖的页面数,索引和其他信息以及可用于进一步利用的可用页面数之类的信息。
- 管理员
通过“管理”选项卡,您可以执行诸如删除整个数据库空间,将空间添加到现有数据库空间以及对数据库空间表格式和数据库空间范围进行完整性检查之类的操作。
有关Chunks表的参数,请参见表6 。
放置空间:在这里,您可以随意放置整个空间。 为此,请从下拉菜单中选择是 ,然后单击放置 。 'rootdbs'数据库空间禁用了此选项。
添加空间:在这里,您可以选择向现有的dbspace添加空间。 这可以通过为以下变量提供相关值来完成:
表5.向现有dbspace添加空间的参数
参数 | 描述 |
---|---|
路径 | 新空间将驻留的路径位置 |
抵消 | 需要在此处提及空间偏移(如果有) |
尺寸 | 所需空间的大小,取决于需求和可用性 |
文件创建 | 您可以选择以下两种模式之一:-“如果不存在则创建文件”或“文件必须存在” |
完整性:您可以通过检查“ Dbspace表格式”和“ Dbspace范围”来检查空间的完整性。
- 桌子
“表”选项卡列出了dbspace中的所有表。 该dbspace表清单提供了各种信息,包括表名,与该表关联的数据库名,相应数据库和表的DB_LOCALE值,表中的行数,创建表的日期和时间,分配给表的页数,已利用的页数和扩展区数。
- 范围
“扩展区”选项卡列出了与给定dbspace关联的所有扩展区。 dbspace扩展区列表包括表的名称,扩展区的开始和结束地址以及与它们关联的大小。
大块
块是专用于数据库服务器数据存储的物理磁盘的最大单元。 块为管理员提供了很大的单元来分配磁盘空间。 单个块的最大大小为4 TB。 允许的块数为32,766。
如果选择Space Admin > Chunks ,将看到两个选项卡-Chunk和Chunk IO(如下图所示)。 默认情况下会显示一个带有“块”选项卡统计信息的窗口。
下表是命令“ onstat -d”的结果输出的一部分
图30:块表
上面描述的“块”选项卡中的表提供了有关每个单个块的配置详细信息的信息。
表6.块表清单的描述
参数 | 描述 |
---|---|
块数 | 顺序列出块(单击列标题将反转显示顺序) |
页面大小 | 指定块内每个页面的大小 |
抵消 | 需要在此处提及与空间的偏移(如果有) |
尺寸 | 块占用的磁盘空间 |
自由 | 提供有关可用空间的统计信息 |
用过的 % | 块使用的空间百分比 |
状态 | 状态指示块是在线还是离线 |
路径 | 路径指向该块所在的位置 |
块I / O
“块I / O”选项卡提供在每个单独的卡盘上执行的I / O信息。 下表描述了“ I / O by Chunk”提供的信息
表7. Chunk I / O提供的信息
参数 | 描述 |
---|---|
块数 | 列出现有的块数 |
块路径 | 块所在的位置 |
读 | 从块读取的总数 |
写 | 写入块的总数 |
恢复日志
恢复日志部分进一步分为四个子类别-逻辑日志,物理日志,检查点和管理。
- 逻辑日志
逻辑日志包含对数据库服务器实例所做的更改的记录。 逻辑日志记录用于回滚事务,从系统故障中恢复等等。
如果选择“ 空间管理” >“ 恢复日志” ,则逻辑日志选项卡处于活动状态,并且默认情况下显示。 现在,页面的上半部分具有饼图,将其分解以说明逻辑日志作为已用空间,可用空间和备份空间的用法。 您可以通过选择“ 数据”按钮来获取饼图的统计信息。
图31.逻辑日志状态
后半部分提供逻辑日志的状态信息。 “数量”列顺序显示逻辑日志的数量。 第二列给出每个逻辑日志的唯一ID。 “大小”列显示每个逻辑日志的大小,第四列“已使用”通知用户每个逻辑日志上已填满的空间量。 “位置”列指示每个逻辑日志所在的位置。
Last Filled列将最后一次使用每个逻辑日志的日期和时间通知用户。 以YYYY-MM-DD格式提及日期,而以HH:MM:SS格式提及时间。 “注释”列将逻辑日志的状态通知用户。 这些状态可能包括已使用,已使用和已备份,已使用和当前或新添加。 最后一列,“填充速率”,指示逻辑日志的填充速率。 可以用每秒字节数或每秒千字节数来描述此填充率。
- 物理日志
物理日志是一组磁盘页面,数据库服务器在其中存储称为前映像的页面的未修改副本。
在“物理日志”选项卡上,将显示一个表格和一个图形。 物理日志信息表包含特定于物理日志的信息,包括其大小,使用的大小量,物理日志的位置,其起始偏移量和缓冲区的大小。
另一方面,该图描绘了饼图,该饼图指示了物理日志的可用空间和已用空间。 单击图形右上角提供的“数据”选项卡时,将以数字方式显示相同的信息。
- 检查站
检查点是指数据库服务器将磁盘上的页面与共享内存缓冲区中的页面同步时的一点。
作为检查点过程的一部分,数据库服务器在消息日志中写入一条检查点完成的消息。
在“块”选项卡上获得的下表是命令“ onstat -g ckp”的结果输出。
图32. Checkpoint的信息
Checkpoints表上的参数说明:
表8.检查点表的参数
参数 | 描述 |
---|---|
间隔 | 检查点间隔ID |
类型 | 指定检查点的类型,其值可以是四个检查点之一:阻止,硬性,规范和取消阻止 |
LSN | 记录检查点的逻辑日志位置 |
触发 | 触发检查点的事件; 事件包括Admin,Startup,CKPTINTVL,LongTX,Recovery,Backup,Plog,Llog,Misc,RTO,CDR,Pload,Conv / Rev,Reorg,HDR,User和Lightscan |
时间 | 检查点发生的时钟时间-星号(*)表示请求的检查点是事务阻止检查点 |
封锁时间 | 该特定检查点的单个事务阻止时间(以秒为单位) |
暴击时间 | 等待关键部分发布所花费的时间 |
冲洗时间 | 刷新缓冲池的时间(以秒为单位) |
持续时间 | 所有事务识别请求的检查点的时间(以秒为单位) |
#脏缓冲区 | 检查点期间刷新到磁盘的脏缓冲区数 |
#等待 | 事务等待检查点的平均时间(以秒为单位) |
- 管理员
管理员标签可让您执行以下操作:- 做检查站
- 添加逻辑日志
- 删除逻辑日志
- 移动物理日志
做检查站
在这里,您可以选择启动两种类型的检查点的选项-正常检查点和同步检查点。
添加逻辑日志
选择管理标签 > 执行检查点 > 添加逻辑日志选项。 表9包括您需要提供的参数以添加逻辑日志。
表9.添加逻辑日志所需的参数
参数 | 描述 |
---|---|
dbspace名称 | 从可用选项中选择数据库空间,然后将其添加到用户打算添加日志的位置 |
尺寸 | 根据要求,以KB为单位指定逻辑日志的大小 |
数 | 需要添加的日志总数; 1至6之间 |
属性 | 确定是在当前日志之后添加逻辑日志,还是在日志末尾添加逻辑日志 |
删除逻辑日志
选择管理标签 > 执行检查点 > 删除逻辑日志选项。 表10包括您需要提供的参数以删除逻辑日志。
表10.删除逻辑日志所需的参数
参数 | 描述 |
---|---|
逻辑日志号 | 下拉菜单列出了逻辑日志的现有数量及其位置。 选择您要删除的日志(一次仅一个日志) |
确认 | 选择删除逻辑日志以确认删除逻辑日志。 如果不确定删除逻辑日志,请选择不删除逻辑日志 。 |
移动物理日志
选择管理标签 > 执行检查点 > 移动物理日志选项。 表11包含您需要提供的参数才能移动物理日志。
表11.移动物理日志所需的参数
参数 | 描述 |
---|---|
dbspace名称 | 从可用选项中选择数据库空间,然后移至用户打算将日志移至的位置 |
尺寸 | 根据要求,以KB为单位指定物理日志的大小 |
确认 | 选择移动物理日志以确认物理日志的移动。 或者,如果不确定是否要移动物理日志,请选择“不移动物理日志” |
- 恢复政策
通过“恢复策略”选项卡,您可以配置恢复时间目标,打开或关闭自动检查点和自动LRU培训,并保存设置。 可以关闭“恢复时间目标”,或者可以在30秒到30分钟之间的任意时间调整其值。 对于自动检查点和自动LRU调整,您只能打开或关闭它们。
服务器管理
此功能可帮助您查看与服务器管理相关的数据库服务器并采取必要的步骤。 有多个子选项可用于丰富服务器管理部分。
- 马赫
这是IDS 11.10和IDS 11.50版本的主要功能之一。 此功能可帮助您维护系统中的高可用性数据复制(HDR),远程独立辅助服务器(RSS)和共享磁盘辅助服务器(SDS)。 有关此功能的文章将很快发表,因为它需要更广泛的解释。
- 组态
这显示了在ONCONFIG文件中声明的配置参数。 每行都指示参数名称,其当前值以及该参数是否可动态配置(请参见图33)。 单击任何参数以获取一个新屏幕,其中包含参数名称,其描述和当前值,如果系统检测到任何偏差或进一步改进时对该值的任何建议以及有关其动态性的信息(请参见图34)。 All the rows distinguished with the color yellow have recommendations. You can also set options to filter out the recommended and dynamic parameters by using the List box located at the top of the screen.
Onconfig File
Figure 33. Parameters of Onconfig file
Onconfig Parameter Details:
Figure 34. Details of individual Parameter
- System validation
This feature checks the consistency and the corruption on data and extents, which is currently done through the oncheck utility. You have the flexibility to check the data format on database level as well as to narrow down the filter on the table level also. Extents can be checked and verified for each dbspace.
Click on Server Administration > System Validation to see the Server Administration Check Validation screens. Figure 35 indicates how to enact a consistency and corruption check on data and extents, narrowing down the filter to the 'table' level.
Figure 35. Server Administration Check Validation-1
Figure 36 shows the extent being checked and verified for each dbspace:
Figure 36. Server Administration Check Validation-2
- User privileges
This option gives you the flexibility to declare user privileges at different levels on the Data Server. Based upon the database selected from the list, you can declare privileges on the database level, table level and also on roles.
On the database level, a user can modify, as well as create, new privileges after choosing the proper options as shown in Figure 37.
To manage privileges at the database level, select a database you wish to modify and select the Database-Level privileges option. Fill in or modify the information for the user, privilege and default role.
Figure 37. Manage privileges - database level
On the table level, you can see the current privileges that have been assigned to each user at each table. To manage privileges at the database level, select a database you wish to modify and select the Table-Level privileges option. You are given option to change the current privileges for each user and on each table as well as to declare new privileges for each user on different tables. The specialty on this screen is menu-based and easily manageable.
Figure 38 shows an example of how to manage privileges at table-level
Figure 38. Manage privileges - table level
In the same Manage Privileges screen, select Roles and fill in the specified information needed to create a new role. Figure 39 shows this step.
Figure 39. Server administration - creating roles
- Virtual processors
The virtual processors option allows you to see the current status and usage of the different virtual processors running the database servers. You have the option to view the data graphically or in a data format. Figure 40 shows a sample graph of the virtual processors.
Figure 40. Server administration processors
You can also add a Virtual Processor when needed through this screen by selecting Add at the bottom of the screen.
Figure 41. Server administration virtual processors
- Auto Update Statistics
The auto Update Statistics feature is the subject of a later article in this series.
Performance analysis
The Performance Analysis menu option has four parts -- SQL Explorer, Performance History, System Reports and Session Explorer. This performance analysis feature lets user monitor various aspects of the IDS.
Figure 42. Performance analysis categories
- SQL Explorer
One of the ways to perform analysis of the overall system is to explore the SQL queries getting executed. This can be facilitated using the query drill down feature. Query drill down allows you to gather statistical information about each SQL statement executed on the system and analyze statement history. The query drill down feature helps determine the length of an SQL statement, the resources each statement uses, the length of the statement execution, the length of the resources wait time and so on. This feature is turned off by default, but can be turned on for all users or for a specific set of users.
Configuration parameter SQLTRACE is used to control the default tracing behavior when the database server starts. When this feature is enabled with its default configuration, the database server tracks the last 1000 SQL statements that ran, along with the profile statistics for those statements. Any user who can modify the $INFORMIXDIR/etc/$ONCONFIG file can modify the value of the SQLTRACE configuration parameter and effect the startup configuration. However, only an Informix user or any DBA who has been granted connect privileges to the sysadmin database can use the Administration API commands to modify the run time status of the SQL trace feature. The information set to control tracing behavior includes:- Level -- this can be low, medium or high. Low-level tracing captures statement statistics, statement text and statement iterators. Medium-level tracing captures low-level tracing information, plus table names, the database name and stored procedure stacks. High-level tracing captures all the information included in the medium-level tracing, plus host variables.
- The number of SQL statements to trace (ntrace)
- The number of kilobytes for the size of the trace buffer (size)
- Mode field specifies the scope of tracing, that is, global for all users on the system or User for users who have tracing enabled by the Administration API task() function
The memory required by this feature is large if a lot of historical information is to be stored. The default amount of space required for SQL history tracing is two megabytes.
The SQL tracing admin tab allows you to change the tracing parameters using the OAT as shown in Figure 43. Select Modify to change any of the parameters.
Figure 43. SQL Explorer, SQL tracing admin tab screen
The Statement Type tab in Figure 44 allows you to perform the query drill down by statement type. The statements that have been executed in the system are grouped by type along with summary statistics for each SQL statement group. The statements types include SELECT, INSERT, DELETE, UPDATE, CREATE, DROP, and so forth. A graphical representation can also be seen on the right hand side of the screen. Select the Data button to see the statements and their count in a tabular form.
Figure 44. Statement Type tab
You can select the type of SQL statement (for example, SELECT or DELETE, etc) to see statement-level details, where all identical statements are grouped together as Figure 45 illustrates. Choose SELECT to go to this SQL Type tab screen. tab screen.
Figure 45. SQL Explorer Screen
From the SQL Type tab screen, you can pick an SQL of interest and click on Drill Down to come to the SQL List screen, shown in Figure 46. This screen displays the detailed statistics about each invocation of this SQL statement. Statistics provided include userid ID of the user who ran the command, the database session ID, the response time of the query, and so on.
Figure 46. SQL List screen
From the SQL List screen, you can choose a session of interest and click on Drill Down to get a detailed profile about this particular SQL statement. The SQL Profile tab screen (Figure 47) provides statistics related to the scans performed, number of buffer reads and writes, number of pages reads and writes, number of lock requests and waits, estimated number of rows, optimizer estimated cost, number of rows returned , and so on.
Figure 47. SQL Profile Tab
Similar to the option to drill down by SQL statement, another way of drilling down to get the performance statistics is to drill down by transaction time. Transaction time is one of the tabs of the SQL Explorer. This tab displays a list of transaction times for the most recent 100 transactions. Information provided includes session IDs and corresponding number of SQL statements, the average response time, maximum response time, average memory used and the number of rows processes in this transaction. Figure 48 shows this Transaction Time Tab.
Figure 48. Transaction Time tab
Click the Drill Down button to explore individual transactions. A list of SQL statements which have been run for the transaction is displayed. Along with this, transaction statistics summary is also displayed. This includes information such as response time, an SQL statement's count of that transaction, cost estimation, sorting statistics, locking related details, and so on. You can use the Drill Down button to go to the next level of exploration, that is, the statement level exploration. This shows the complete SQL profile for individual statements as explained under the SQL Profile Tab Screen.
Figure 49. Transaction screen
Another option to explore SQL statements is by their frequency. The Frequency tab shows the list of SQL statements with their frequency of execution along with the average response time, lock wait, and wait IO time. Use the Drill Down buttons on this screen to drill down further and explore the individual statements.
Figure 50. Frequency tab screen
Performance history
Using the Performance History menu option from the Performance Analysis, gives you a graphical view of the various aspects of the database-related operations which contribute to good and bad performance. It also provides data in the tabular form for users to draw conclusions about the performance of the server and to take corrective actions if needed. Some of the areas covered under this include auto checkpoints, disk reads, disk writes, disk flushes, chunk writes, foreground writes, buffer reads, buffer writes, buffer waits, general profile (including deletes, commits, locks, deadlocks, sorts, scans, and the like), and btree scanner.
The time range that is covered by these graphs is whatever is available in the sysadmin:mon_profile table. This mon_profile table is populated from the dbcron task 'mon_profile', so it depends on how often that is scheduled to run. By default, it is once every four hours. The data is also auto-deleted based on the settings of the task mon_profile. The default is seven days, so any data older than seven days is purged from the table and is not available to be seen in these graphs. The 2k, 4k and so on indicate the page sizes that are available for dbspace sizes (therefore chunk sizes). For example, if a dbspace is created with an 8k page size, then the user will have chunks within that dbspace that have 8k pages which ultimately means that user will get 8k page reads/writes and 8k buf reads/writes.
System reports
The System Reports menu option under Performance Analysis helps user create various reports related to different areas of the server , for example, disk usage, memory pool, table actions, performance, sessions, and so on. These reports consolidate the information for the user to take necessary actions (for example, in case of shortage of disk space, adding new chunks or monitor table locking, memory usage, virtual processors, and so on to check the scope of performance improvement, monitoring logical logs to ensure logs availability, and the like).
Reports are categorized as Disk, Performance, Network, SQL Tables and Users as shown in Figure 51 Every category includes a few reports, for example if Disk category is chosen from the list box, then Disk Space Usage, Online Log, Logical Logs, View Checkpoints, Disk IO Levels, Server Admin Commands, Physical Log and System Backups reports are chosen automatically. Use the Create Report button to generate a consolidated report for all of these.
Figure 51. System Report screen
Figure 52 shows a report generated to get more information about logical logs. Information provided in this report like total number of logs, their status (backed up, used, available), fill rate, and so on helps users make a decision on the need to add new logs or just do general log maintenance.
Figure 52. Logical Logs Report screen
Session Explorer
As the name suggests, the Session Explorer provides detailed information of all the current user sessions running at the server. Figure 53 shows a typical Session Explorer screen.
Figure 53. Session Explorer screen
Click on the session id under the SID heading to see the details of the individual session.
The SQL tab of the Session Explorer shows SQL statements with their IDs and Type (INSERT, DELETE, SET ISOLATION, SET LOCK MODE, and so on). You can see these SQL statements only if SQL tracing is enabled using the configuration parameter SQLTRACE.
Figure 54. Session Explorer SQL tab
The Locks tab provides information about all the locks associated with a session. These locks could be table level, row level, or lock on index, and so on. For every lock , you can see details like the database name: table name/index name on which the lock is applied, the type of lock (shared, exclusive, update, byte, intent shared, intent exclusive, intent shared exclusive, etc), the duration for which that lock is held, the id of the locked row, waiters for the lock if there are any. Index # 1 indicates that the lock is on an index. Key Item Locked is the locked index entry.
Figure 55. Session Explorer Locks tab
The Threads tab of the Session Explorer provides information pertaining to the threads belonging to the selected session. There is one primary thread associated with a user session, and there could be many more depending on how client's requests are being processed. From the Threads tab, user can know the current threads, their IDs, their priorities, the number of times each thread has run on a virtual processor (NUM_SCHEDULED), the amount of time that each thread has spent running on a virtual processor(TOTAL_TIME), the time slice that each thread got for its run (TIME_SLICE), the virtual processor id the thread ran on last (VPID) and the wait reason (WAIT_REASON) for every thread, and IO wait.
Figure 56. Session Explorer Threads tab
The Memory tab helps you get a consolidated view of memory usage and availability for a session. The Name column lists the name of the memory pool. Just a number in the NAME column is the session id since memory pools for a session are tracked by session id. USED and FREE columns list the total amount of memory from the used list and total amount of memory from the free list. These two columns are formatted using the format_units function.
Figure 57. Session Explorer Memory tab
The Network tab provides a detailed picture of the network usage of a session. The Client protocol name is displayed as the THREAD_NAME. Along with this, the start time of the session (SESSION_START), duration of this session (CONNECT_DURATION), time of the last read from the network ( LAST_READ) and time of the last write to the network(LAST_WRITE) can be seen. Network usage in terms of data sent and received can be obtained from the columns AVERAGE_RECV, AVERAGE_SEND, RECEIVED_DATA, SEND_DATA. RECEIVED_DATA is the number of bytes transferred to the server and SEND_DATA is the number of bytes transferred to the client. The number of network reads and number of network writes are used to calculate the average values provided.
Figure 58. Session Explorer Network tab
A complete picture of a server and session environment can be obtained by using the Environment tab. The Environment tab lists the startup environment setting of the server and also the environment variables at the session that is, the client level.
Figure 59. Session Explorer Environment tab
The Profile tab of the Session Explorer provides the profile counts for the session being looked at. The Locks profile count includes locks which is the number of locks currently held, Lock Requests is the number of requested locks, Lock Waits is the number of lock waits, Dead Locks is the number of dead locks detected, Lock Time Outs is the number of timed out lock requests. Logs related statistics include Log Records which is the number of log records created by the session, Log Space is the log space currently used and Max Log Space is the maximum log space ever used.
Figure 60. Session Explorer Profile tab
Values like rows processed in terms of isam reads (Rows Processed), rows inserted (Rows Inserted) in terms of isam writes, rows updated (Rows Updated), rows Deleted provide record level statistics. Commits, Rollbacks, LongTXs provide transaction related counts like the number of commits, number of rollbacks and number of long transactions. Sequential Scans is the number of sequential scans performed. Sorting statistics comes from Sorts which is the total number of sort operations performed, Disk Sorts which is the number of sorts performed on the disk and the Memory Sorts is the number of sort operations performed in the memory which is calculated as the difference between the total sorts and the disk sorts. Largest Sort provides the maximum sort space used on disk. Statistics on buffer can be obtained from the two fields Buffer Reads and Buffer Writes which is the number of reads and writes done from and to the buffers respectively.
Foreground (FG) reads and FG writes are the general reads and writes done during the session. Thus, the Profile tab of a session provides useful information about the session from various aspects.
SQL Toolbox
The SQL Toolbox category is mainly classified into three sub-categories, namely:
- Databases
- Schema browser
- SQL editor
Databases
The Databases link opens the Databases tab, displaying a pie chart that shows the percentage of space occupied by each database, as well the list of the databases. When you take the mouse pointer on top of the pie chart pointing to each database portion, you can see the percentage value that particular space has covered within the pie chart. Clicking on the Data tab on the top right corner of the graph provides the statistics of each individual of the pie chart.
Figure 61. Information on various databases
Note the Databases table below the graph that lists all the databases on the given IDS server under the Names column. The Collation column has the value for DB_LOCALE for the respective databases. The Create Date column specifies the date when the database was created, with YYYY-MM-DD being the format. The Logging column mentions the logging mode that has been set while creating the database (buffered, unbuffered, ANSI compliant, and not logged).
Schema browser
To study the contents of each database in depth, click on the respective database as listed in the Databases table. This action activates the sub-category 'Schema Browser' and displays the contents of the Tables tab by default. The schema browser has Tables as its first tab, which is followed by the tab SPL/UDR.
The Tables tab lists all the tables contained within the chosen database. At any given point in time, the user can choose a database or the IDS server, using the option provided at the top right corner of the screen. The drop-down menu for Server lists the servers defined for the particular group chosen, while the drop-down menu for Database lists the databases within that particular IDS server.
Do you need the database catalog tables to be listed along with other tables in the list ? This choice is up to you. To list the database catalog tables with the other tables in the list, check the Include Database Catalog Tables box and then select Submit . If you do this step, you should see the database catalog tables listed; if not, the listing will be independent of the database catalog tables.
A snapshot of the table on the Tables tab is shown in Figure 62:
Figure 62. Tables Info on Schema Browser
Description of the parameters used to move a physical log
Table 12. Tasks in the scheduler
参数 | 描述 |
---|---|
浏览 | An icon that opens up a new tab 'Table Browse' |
名称 | Name of the table, view or synonym |
Create date | Date of the creation of the table |
Table id | System-assigned sequential identifying number |
Partnum | Physical location code |
Rowsize | Row size |
NRows | Number of rows in the table |
NIndexes | Number of indexes on the table |
Locklevel | Lock mode for the table: B = Page P = Page R = Row |
Fextsize | Size of initial extent (in kilobytes) |
Nextsize | Size of all subsequent extents (in kilobytes) |
Pages Used | Number of pages utilized |
视图 |
From the parameters listed in Table 12, the columns Browse, Name and Partnum provide further information apart from what has been mentioned in the table. By clicking the icon on the Browse column for a given table name, 'Table Browse' tab opens by the side of the SPL/UDR tab. This tab lists the output of the query ' select * from tabname;'. where the tabname is the name of the respective table with which the icon is associated.
Choosing a table listed under the column Name opens the Column Info tab which describes the properties of its columns. The description includes on the name of the column, column type, column length and its extended type. The table as displayed by the tab Column Info will be as shown below.
Figure 63. Column Info for a given table
Selecting certain values of the Partnum column causes a window to pop up that displays the partition information for the respective value. The following image shows a snap shot of the pop up screen displaying the partition info.
Figure 64. Partition information
SQL Editor
You are provided with an SQL Editor window, where in you can type or paste down the SQL statement and execute it. In order to execute, you need to click Run Query . You can save in the SQL Editor by clicking Save query to file . When you choose to save the query to a file, the OAT automatically generates a filename, and this filename is appended with a number which increases by one every time the user chooses to save a query to the file.
Figure 65. SQL Editor
In Figure 65, notice that there are two SQL statements typed in the SQL Editor window, separated by a semicolon. When you execute the above queries using the 'Run Query' option, the resultant output will be displayed in a separate Results tab and should be something similar to the image in Figure 66.
Figure 66. SQL results
Also, along with the result being displayed on the Results tab, you should see a notification similar to the one in Figure 67.
Figure 67. SQL Editor import limitation
This message indicates that only the query that appears before the first semicolon will be executed and all the subsequent lines after the semicolon will be removed.
Limiting the resultant output : The resultant output of the query being executing can be limited using the following options provided in the SQL Editor.
Table 13. Limiting the resultant output of the query
参数 | 描述 |
---|---|
Text/Clob column option | Choose the nature of the output that has Text/Clob; select one of the following to limit query output: 显示所有 Show 255 Chars Show in File Show Size only Ignore Column |
Byte/Blob column option | Choose the nature of the output that has Byte/Blob; select one of the following to limit query output: Ignore Column Show in File Show Size Only Show As Image |
行数 | For queries with order by, group by, sub queries, distinct, unions, and aggregates, the number of rows to fetch can be limited by providing a value into the text box. The user can also reset the value using the option 'Reset'. |
Import Query: You are also provided with an option to import queries if they already exist in a file. To do this, you need to click on Browse , locate the file and then click Import . The resultant query will appear in the SQL Query Editor window. You should be aware of the information that, similar to the condition mentioned while explaining Run Query, during import, only the query that appears before the first semicolon will be projected on to the SQL Query Editor and all the subsequent lines after the semicolon will be removed. Now you can proceed with the execution of the imported query, whose results will be displayed in the Results tab.
摘要
The OpenAdmin Tool is an effective, useful front end tool for working with IDS databases. In this article, we introduced many of the OAT components and described how to work with them. After reading the article, you should be able to establish connections for various IDS instances with the tool, manage connection groups, handle basic operations, perform various administrative functions, generate relevant reports, display adequate space information as and when required, and execute queries. In subsequent articles in this series, you'll learn how to migrate from the Informix Server Administrator to OAT, and how to analyze your server performance using OAT.
翻译自: https://www.ibm.com/developerworks/data/library/techarticle/dm-0807kudgavkar/index.html