db2-rhel

Operational guidance for installing, configuring, and managing IBM DB2 LUW on RHEL 9 (and AlmaLinux/Rocky 9). Covers instance creation, database administration, buffer pool and tablespace management, HADR backup/restore, performance tuning (e.g., db2advis, db2pd, MON functions), runstats/reorg, SELinux contexts, firewalld rules, and DB2 pureScale. Part of the db2-* skill family.

Last repository push
GitHub Stars
212
Forks
664
Issues / PRs
21

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "db2-rhel" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-b9d38a162648c096906e5a622a601215230f0e7b283974d76cd1c4f840743483. Verify the upstream source and version against https://github.com/Kilo-Org/kilo-marketplace before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Operational guidance for installing, configuring, and managing IBM DB2 LUW on RHEL 9 (and AlmaLinux/Rocky 9). Covers instance creation, database administration, buffer pool and tablespace management, HADR backup/restore, performance tuning (e.g., db2advis, db2pd, MON functions), runstats/reorg, SELinux contexts, firewalld rules, and DB2 pureScale. Part of the db2-* skill family.

0 Downloads

Introduction source: third_party · Kilo-Org · 0.0.1 Reference

SkillPi interpretation

Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: db2-rhel
description: >-
  Use when installing, configuring, or managing IBM DB2 LUW on RHEL 9 (and
  AlmaLinux/Rocky 9) — instance creation, database administration, buffer pool
  and tablespace management, backup/restore with HADR, performance tuning
  (db2advis, db2pd, MON functions), runstats/reorg, SELinux contexts, firewalld
  rules, and DB2 pureScale. Part of the db2-* skill family.
metadata:
  category: data
  source:
    repository: 'https://github.com/joogy06/agent-foundry'
    path: skills/db2-rhel
    license_path: LICENSE
    commit: 527e3a8e9d395f564d62a63ef3bff5ff44bc9b6f

IBM DB2 LUW — Administration on RHEL 9

Companion skill to rhel-server-admin and rhel-databases. For Python DB2 connectivity see python-enterprise-connectors.

<HARD-RULE> Always RUNSTATS after bulk loads and before production queries — stale stats produce bad access plans. The optimizer relies on distribution statistics to choose join methods, index paths, and sort strategies. Stale or missing stats silently degrade performance by orders of magnitude. </HARD-RULE>

<HARD-RULE> Never modify DB2 registry variables on a running production instance without scheduling a maintenance window — most require db2stop/db2start to take effect, and some (DB2_WORKLOAD, DB2_PARALLEL_IO) change optimizer behavior globally. Always db2set -lr to list variables, test in non-prod first. </HARD-RULE>

<HARD-RULE> Always test HADR takeover procedures regularly — untested failover is not HA. Run TAKEOVER HADR on the standby at least quarterly in a maintenance window. Verify automatic client reroute (ACR) reconnects applications. Document RTO/RPO and validate them. </HARD-RULE>

<HARD-RULE> Never disable SELinux for DB2 — use correct contexts and fcontext rules. DB2 directories (/opt/ibm/db2, instance home, database paths) need proper SELinux labels. See the RHEL-Specific section for exact fcontext commands. </HARD-RULE>


Reference Files

Detailed code examples, patterns, and configuration are in the reference files below. Read the relevant file when working on that area.

File Covers
install-admin.md DB2 installation on RHEL, instance management, and database administration (tablespaces, buffer pools, schemas, tables)
performance-monitoring-rhel.md performance tuning (db2advis, db2pd, MON functions), monitoring, maintenance, RHEL-specific configuration, and DB2 pureScale
security-backup-recovery.md DB2 security (authentication, authorization, roles, audit), backup strategies, and HADR recovery


Anti-Patterns

Anti-Pattern Why It Fails Correct Approach
Running DB2 with default buffer pool sizes Default 1000 pages is far too small for production; excessive disk I/O, poor query performance Size buffer pools based on workload: OLTP needs 60-80% of data in memory; run db2pd -bufferpools to monitor hit ratio
Skipping RUNSTATS after bulk data loads Optimizer uses stale cardinality estimates; queries that were fast become full table scans Run RUNSTATS WITH DISTRIBUTION on tables and indexes after every significant data change
Using HADR without automatic client reroute Failover happens but applications cannot find the new primary; manual intervention required Configure ALTERNATE SERVER in database directory and enable ACR in application connection strings
Not setting LOGFILSIZ and LOGPRIMARY appropriately Default log sizes cause log-full conditions during batch loads; transactions roll back and retry endlessly Size transaction logs based on largest expected transaction; monitor with db2pd -logs; set LOGSECOND as overflow
Running backup without testing restore Backup jobs succeed but restore fails due to missing log files, wrong paths, or version mismatch Test restore to a different instance quarterly; validate with RESTORE DB ... WITHOUT ROLLING FORWARD

Related Skills

Workload Skill
Core RHEL admin (dnf, SELinux, firewalld, LVM) rhel-server-admin
PostgreSQL, MySQL, Redis on RHEL rhel-databases
Python DB2/Oracle/SQL Server connectors python-enterprise-connectors
Web servers (Nginx, Apache, Caddy) rhel-web-servers
Docker / Podman containers rhel-docker-host
Monitoring (Prometheus, Grafana, PCP) rhel-monitoring

Version history

  1. skills-20261103210927-6c1b454 GitHub ↗
    Original release notes

    Automated skills release from commit 6c1b4543cac1d45a80bf5904e4b69ac315117323

  2. skills-20260928190452-ff51758 GitHub ↗
    Original release notes

    Automated skills release from commit ff51758b06b8249007116184096765d47bdb7505

  3. skills-20260924105536-d31110d GitHub ↗
    Original release notes

    Automated skills release from commit d31110d62dc0bd00c22f1d6f6a630d1e702a0049

  4. skills-20260923085113-cea285e GitHub ↗
    Original release notes

    Automated skills release from commit cea285ef0e4d6ec47cd2fd9fdbca03813a3363c7

  5. skills-20260922193956-97d7333 GitHub ↗
    Original release notes

    Automated skills release from commit 97d7333d8200e5ac556c659c8669f3a83ba10866

Only the five most recent versions are shown. View full version history at the source ↗

Current listing version

0.0.1

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 针对企业级 IBM DB2 LUW 在 RHEL 9 上的完整运维场景,涵盖安装、配置、性能调优、HADR 等高价值需求
  • 提供具体最佳实践和反模式指导,显著提升 DBA 工作效率
Trigger Precision95/100

Highlights

  • 触发描述完整覆盖 DB2 运维的多个关键子领域,边界清晰,无歧义
Structure and Standards90/100

Highlights

  • 结构清晰,分区合理,包含硬规则、参考文件、反模式等实用模块
  • frontmatter 完整,文档组织规范
Execution Reliability90/100

Areas to improve

  • 引用文件缺失 Reported severity: Major

    SKILL.md 中引用了 install-admin.md、performance-monitoring-rhel.md、security-backup-recovery.md 三个参考文件,但未传入这些文件

    Recommendation: 请补充上传所有被引用的参考文件,或明确说明这些文件将在后续提供

Highlights

  • 提供了具体可靠的 DB2 和 RHEL 命令,覆盖生产环境关键注意事项
  • 强调测试验证和维护窗口,降低执行风险
Evidence Verifiability (mean of the first four)92/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • github.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.