db2 Script和Outputlinesize [英] db2 Script and Outputlinesize

查看:88
本文介绍了db2 Script和Outputlinesize的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

那里有来自Oracle World的
我想知道是否有DB2命令

喜欢set linesize 1000"在SQL * Plus中。


DB2命令行插入< CR>在n个字符之后但是我想从一行中的SELECT行获得所有

个字符。


我如何用DB2做到这一点。


抱歉我的英文不好。


亲切的问候


Michael

Hi, there .....

coming from the Oracle World I am wondering if there is a DB2 command
like "set linesize 1000" in SQL*Plus.

The DB2 Commandline inserts <CR> after n Characters but I want all
characters from a SELECT Row in one line.

How do I do that with DB2.

Sorry for my bad english.

Kind regards

Michael

推荐答案

>来自Oracle World我想知道是否存在DB2命令
> coming from the Oracle World I am wondering if there is a DB2 command
,例如set linesize 1000。在SQL * Plus中。
like "set linesize 1000" in SQL*Plus.



oracle有很多内置功能可以从sql创建原始的

报告。我怀疑今天这主要用于将b / b
导出数据到文件中(因为oracle导出实用程序是一个附件

成本)。

db2没有太多功能可以直接创建报告

的sql - 但它有一个免费的导出工具。所以,这个功能真的不需要




降价



oracle has a lot of built-in functionality for creating primitive
reports from sql. I suspect that today this is mostly used for
exporting data to files (since the oracle export utility is an add-on
cost).

db2 doesn''t have much functionality for creating reports directly out
of sql - but it has a free export utility. So, it really doesn''t need
this functionality much.

buck


正确。


我没有导出任何数据。我有一个简单的脚本,读取一些

数据用于监视db2实例。


脚本的输出显示在网页(NAGIOS)上show

数据库的状态。


脚本是:


SELECT CASE(HI_ID)

当1001那么'数据库状态''

当1002然后'共享排序mem util''

当1003那么'%'排序溢出''

当1004那时''最大排序记忆使用''

当1005那么'交易记录的完整性''

WHEN 1006然后'完整的日志FS''

当1007那么'死亡率''

当1008那么''锁定列表利用''

当1009那么'DB锁定esc。价格''

当1010那么'%'的应用等待锁''

当1011那么''封装缓存hitratio''

WHEN 1012然后'目录缓存hitratio''

当1013那么'共享SQL工作区hitratio''

当1014那么'堆利用率''

当1015那时'需要手动重组''

当1016那时''有'b'状态''

当1017那时''延迟'' />
当1018那时需要手动备份''

当1022那时''runstats''

ELSE CHAR(HI_ID)

END为问题区域,

HI_ALERT_STATE_DETAIL作为状态,

HI_VALUE,substr(HI_ADDITIONAL_INFO,1,100)为HI_ADDITIONAL_INFO

FROM DB2
Correct.

I am not exporting any data. i have a simple script that reads some
data for monitoring the db2 instance.

the output of the script is displayed on a web page (NAGIOS) to show
the status of the database.

script is :

SELECT CASE(HI_ID)
WHEN 1001 THEN ''state of the database''
WHEN 1002 THEN ''shared sorting mem util''
WHEN 1003 THEN ''percent sort overflow''
WHEN 1004 THEN ''max sort mem used''
WHEN 1005 THEN ''fullness of transaction log''
WHEN 1006 THEN ''fullness of log FS''
WHEN 1007 THEN ''rate of deadlock''
WHEN 1008 THEN ''locklist utilization''
WHEN 1009 THEN ''DB lock esc. rate''
WHEN 1010 THEN ''percent apps waiting on locks''
WHEN 1011 THEN ''package cache hitratio''
WHEN 1012 THEN ''catalog cache hitratio''
WHEN 1013 THEN ''shared SQL workspace hitratio''
WHEN 1014 THEN ''heap utilization''
WHEN 1015 THEN ''manual reorg required''
WHEN 1016 THEN ''hadr op status''
WHEN 1017 THEN ''hadr delay''
WHEN 1018 THEN ''manual backup required''
WHEN 1022 THEN ''runstats''
ELSE CHAR(HI_ID)
END as "AREA OF ISSUE",
HI_ALERT_STATE_DETAIL AS STATUS,
HI_VALUE, substr(HI_ADDITIONAL_INFO,1,100) as HI_ADDITIONAL_INFO
FROM DB2


HEALTH_DB_HI

WHERE HI_ALERT_STATE!= 1


和视图DB2
HEALTH_DB_HI
WHERE HI_ALERT_STATE != 1

and the view DB2


这篇关于db2 Script和Outputlinesize的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆