If you need to limit the query(package,plan) running time, but the JCL/JOB TIME parameters doesn't work in most case. Here is some step by step of how to make it work using the resouce limit facility.

  • Check the RLFAUTH in your zparm file, the default was sysibm.
    RLFAUTH=SYSIBM
  • Create table DSNARL and related index with schema above.
  • Populate the data to limit the query execution time.
    INSERT INTO sysibm.DSNRLST01
    (RLFFUNC, RLFCOLLN, RLFPKG, LUNAME, ASUTIME)
    VALUES('2', 'DSNTEP2', '', 'PUBLIC', 5);

Keep the LUNAME as PUBLIC so all local and remote SQLs will been terminated.

Change the DSNTEP2 name to your collection name if you bind it with different name or want to limit other package/collection.

Adjust the ASUTIME to meet your requirement, you can just explain the whole workload and select max(procsu) from dsn_statemnt_table to get the minimal value for it.

On zEC12, the query will run 30 seconds, the -905 report 90 CPU SECONDS = 000006000000 SERVICE UNITS

http://www-01.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/com.ibm.db2z10.doc.perf/src/tpc/db2z_calculateserviceunits.dita?lang=en

  • Start the rlimit with command

    -SA9HSTA rlimit id=01

    Run some long running query to verify it. The job will exit with return code 8. But if you set the SYSPRINT to dummy, it didn't show the error code, you need to set it //SYSPRINT DD SYSOUT=* to check the error code.

  • Stop the rlimit after your workload run.

    -SA9HSTO rlimit
  • The rlimit will inactive after refresh DB2, so add the start rlimit after your had start DB2.

Limit the query running time with Resource limit facility (RLF)的更多相关文章

  1. Spark2.x(五十六):Queue's AM resource limit exceeded.

    背景: 按照业务需求将数据拆分为60份,启动60个application分别运行对每一份数据,application的提交脚本如下: #/bin/sh #LANG=zh_CN.utf8 #export ...

  2. zabbix报错cannot set resource limit: [13] Permission denied解决方法

    zabbix-server启动时出现以下错误: 2912:20180326:050930.023 using configuration file: /etc/zabbix/zabbix_server ...

  3. EVALUation mode running with code size limit:2k keil进行仿真过程中出现的报错

    EVALUation mode running with code size limit:2k 如果keil软件未破解,会限制程序的存储大小.第一是你的软件没有破解,不能编译2K以上的程序:这种情况下 ...

  4. zabbix 启动报错 cannot set resource limit: [13] Permission denied

    zabbix 启动报错 cannot set resource limit: [13] Permission denied 1.zabbix-server 启动报错 报错信息如下: ::140823. ...

  5. 资源限制 ( resource limit 或 rlimit ),是 Linux 内核控制 用户 或 进程 资源占用的机制。

    ###### https://learn-linux.readthedocs.io/zh_CN/latest/administration/kernel/rlimit.html ########### ...

  6. [转]Robotium环境搭建中的Errors running builder 'Android Resource Manag

    转自:http://blog.sina.com.cn/s/blog_68f262210102v75t.html 最近学习了Robotium测试框架,当然学习任何一个框架或是语言之前,第一步就是搭建环境 ...

  7. Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)

    Crazy Bobo Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others) Tota ...

  8. error.log worker_connections exceed open file resource limit: 1024

    不按照预期响应请求 nginx.conf中worker_connections 与ulimt -n 配置的冲突

  9. Hibernate实现limit查询报错 :unexpected token: limit near line 1, column 33 [from pojo.Product p order by id limit ?,? ]

    原因: hibernate无法识别limit,  hql语句更不能这样写String hql="from Product p order by id limit ?,? "; 解决 ...

随机推荐

  1. magento 切换数据库,使用不同数据库

    1. 在app/etc/local.xml 中,添加新的数据库选项 <?xml version="1.0"?> <config> <global> ...

  2. (leetcode) countandsay

    class Solution { public: string calcuate(string s) { string result; char pre = s[0]; int cnt = 1; fo ...

  3. synchronized锁自旋2

    http://www.infoq.com/cn/articles/java-se-16-synchronized 1 引言 在多线程并发编程中Synchronized一直是元老级角色,很多人都会称呼它 ...

  4. 浅析 Linux 初始化 init 系统,第 1 部分: sysvinit 第 2 部分: UpStart 第 3 部分: Systemd

    浅析 Linux 初始化 init 系统,第 1 部分: sysvinit  第 2 部分: UpStart 第 3 部分: Systemd http://www.ibm.com/developerw ...

  5. Android 关于ExpandableListView去掉里头的分割线

    关于ExpandableListView去掉里面的分割线关于ExpandableListView,自己写了个类继承自BaseExpandableListAdaptergroups,childs都弄好了 ...

  6. Android图片压缩方法总结

    本文总结Android应用开发中三种常见的图片压缩方法,分别是:质量压缩法.比例压缩法(根据路径获取图片并压缩)和比例压缩法(根据Bitmap图片压缩).   第一:质量压缩方法:   ? 1 2 3 ...

  7. C#线程系列讲座(2):Thread类的应用

    一.Thread类的基本用法 通过System.Threading.Thread类可以开始新的线程,并在线程堆栈中运行静态或实例方法.可以通过Thread类的的构造方法传递一个无参数,并且不返回值(返 ...

  8. weblogic对jms实现的QueueConnection实现与TopicConnection实现问题

    今天看了一段之前同事写jms的代码,觉得好像不对,但是不可能,生产上用的代码.刚开始想了下,脑子没转过弯来,后来一想是个简单的问题 代码如下: topicConnection = (TopicConn ...

  9. MVC4之ModelBinder-模型绑定

    最近悟出来一个道理,在这儿分享给大家:学历代表你的过去,能力代表你的现在,学习代表你的将来. 十年河东十年河西,莫欺少年穷 学无止境,精益求精    最近在做自学MVC,遇到的问题很多,索性一点点总结 ...

  10. C++ note

    主要是为了学习c++的类和对象   内容摘自 c++概述 http://see.xidian.edu.cn/cpp/biancheng/cpp/rumen_1/   1,变量  ,C++中,我们可以在 ...