Oracle DBA — SUPER Skill Library
A single, self-contained library that fuses two layers:
- KNOWLEDGE (the brain) —
knowledge/: Oracle's official, source-backed guidance (vendored fromgithub.com/oracle/skills, UPL-1.0 — seeNOTICE.md). Markdown only; the agent reads it and acts through the SQLcl MCP server. Breadth: SQL/PL-SQL, appdev, frameworks, migrations, ORDS, design, performance concepts, security concepts, features, containers, and agent-safety patterns. - ACTION (the hands) — the 24 domain skills at the root (e.g.
backup-and-recovery/,rac-high-availability/): our tier-gated, executable automation — idempotent.sh/.ps1sql/*.sql+ deep T3 runbooks + cron, all sourcing the shared_common/harness, wired for native SQLcl-MCP (in-DB) and a custom guardedoracle-dba-opsMCP (host ops; see playbook).
Golden rule: knowledge tells you HOW and WHY; action DOES it under the tier policy. For any change, consult the relevant
knowledge/page first, then execute via the action domain.
How to Use This Library
- Classify the request: knowledge/dev/design vs operational action.
- Knowledge → open
knowledge/SKILL.md(its routing table) and read only the file you need. - Action → open the matching domain's
SKILL.md, find the task in its Scope & risk map, then follow precheck → action (script/sql) → postcheck → rollback. Honor the tier. - For ANY destructive/changing operation, also load the agent-safety guidance:
knowledge/agent/destructive-op-guards.md,knowledge/agent/idempotency-patterns.md,knowledge/agent/safe-dml-patterns.md,knowledge/agent/schema-discovery.md,knowledge/agent/ora-error-catalog.md.
Global Autonomy Policy (enforced by every action domain)
- T1 — Observe (read-only): monitoring, health/space/AWR reports, status queries. Self-executes.
- T2 — Reversible / low blast-radius: scheduled backups, RMAN CONFIGURE, gather stats,
Data Pump export, restore-point create, etc. Self-executes only with a
--dry-runpreview (default ON), structured logging, and a postcheck; explicit--executeto act. Capped at T2. - T3 — Destructive / recovery / HA / structural: restore/recover, PITR/TSPITR, switchover/ failover, DROP/TRUNCATE, patch apply, node eviction, TDE key ops, decommission. Never self-executes — requires a human approval token AND defaults to a runbook of exact commands.
- When in doubt, runbook. This mirrors Oracle's own guidance: least-privilege user (never SYS/SYSTEM), sanitized non-prod first, audit LLM activity, never enable auto-approve.
Native Integration (runs on a DB VM through Claude Code)
- In-database SQL/PL-SQL → the official SQLcl MCP server (
sql -mcp, SQLcl 25.2+, JRE 17/21) on the saved least-privilege connectiondba_ai_conn(wallet,-savepwd). SQLcl defaults to restrict level 4 (no host commands) and auto-logs toDBTOOLS$MCP_LOG+ tagsV$SESSION.MODULE/ACTION+/* LLM in use */. - Host/OS ops (RMAN, Data Pump binaries,
dgmgrl,srvctl, AHF/TFA, recovery) → the generated.sh/.ps1, fronted by the custom guardedoracle-dba-opsMCP — BUILT atmcp-server/: a tier-aware gateway to the action scripts (reads each script's# TIER:banner; T1 runs, T2 dry-run-default, T3 runbook-only; rejects shell metachars + path traversal). Self-test: 12/12. - Set up on a VM: run
bootstrap/bootstrap.sh --register-mcp(Linux) orbootstrap/bootstrap.ps1 -RegisterMcp(Windows) — registers BOTHsqlclandoracle-dba-ops. Orinstall.sh/install.ps1to install + validate in one step. MCP server docs:mcp-server/README.md. - Authoritative wiring + restrict levels + tools:
knowledge/sqlcl/sqlcl-mcp-server.md. - Merged architecture + gaps:
references/INTEGRATION-PLAYBOOK.md.
Routing — ACTION domains (executable, tier-gated)
| If the user wants to… | Action domain |
|---|---|
| install/provision/configure DB, GI, ASM, listener, params, NLS | provisioning-installation-configuration/ |
| create/reset/lock users, roles, profiles, grants, recertify | user-role-access-management/ |
| watch up/down, alert log, space, sessions, locks, lag, jobs | monitoring-alerting/ |
| add/resize datafiles, tablespaces, ASM, reorg, FRA, cleanup | space-storage-management/ |
| RMAN/Data Pump backups, restore points, crosscheck, recovery | backup-and-recovery/ |
| AWR/ASH, top-SQL, stats, kill sessions, plan baselines, tuning | performance-tuning-diagnostics/ |
| OPatch/RU, datapatch, AutoUpgrade, rolling/standby-first patch | patching-upgrades/ |
| srvctl services, VIP/SCAN, OCR, node add/del, clusterware RCA | rac-high-availability/ |
| transport/apply lag, broker, switchover/failover, standby build | data-guard-disaster-recovery/ |
| Extract/Replicat, trail files, initial load, CDR, MViews | goldengate-replication/ |
| RMAN DUPLICATE clone, PDB clone/refresh, TTS/XTTS, ZDM, masking | cloning-refresh-migration/ |
| PDB open/close/save-state/clone/plug, resource mgr, lockdown | multitenant-cdb-pdb/ |
| DBMS_SCHEDULER jobs, chains, external jobs, job failures | job-scheduling-automation/ |
| recompile invalids, purge recyclebin/audit, index rebuild, MView refresh | routine-maintenance/ |
| auditing, CIS hardening, TDE/wallet, redaction, VPD, Vault | security-encryption-auditing/ |
| listener restart/config, tnsnames, CMAN, ORA-12xxx, SQL*Net tuning | networking-connectivity/ |
| flashback query/table/drop/transaction, restore points, FDA, FDB | flashback-technologies/ |
| status/space/SLA reports, growth forecasting, chargeback | capacity-planning-reporting/ |
| triage, ORA-error/RCA, hang/deadlock, AHF/TFA, ORA-600/7445, SR | incident-problem-management/ |
| Exachk, cell mgmt, IORM, Smart Scan/flash cache, expansion | exadata-engineered-systems/ |
| compression/HCC, In-Memory, partitioning, sharding, result cache | advanced-features/ |
| OEM target/agent/blackout/template, repository, Cloud Control | enterprise-manager-oem-tooling/ |
| Autonomous/Base DB provisioning, cloud backup, auto-scaling, ZDM/DMS | cloud-autonomous-oci/ |
| final backup, shutdown/decommission, cleanup, archival, secure destroy | decommissioning-lifecycle-end/ |
Routing — KNOWLEDGE base (read, then act)
Open knowledge/SKILL.md for the full routing table. Highlights:
| Topic | Knowledge path |
|---|---|
| Agent-safe DML, destructive guards, idempotency, schema discovery, ORA- catalog, NL→SQL, intent | knowledge/agent/ |
| SQL tuning, patterns, dynamic SQL, injection avoidance | knowledge/sql-dev/ |
| PL/SQL package/error/perf design, collections, cursors, debugging | knowledge/plsql/ |
| AWR, ASH, explain plan, indexes, optimizer stats, wait events, memory | knowledge/performance/ |
| Privileges, VPD, masking, auditing, encryption, network security | knowledge/security/ |
| JDBC, pooling, JSON/XML, spatial, Text, transactions, MLE, drivers | knowledge/appdev/ |
| SQLAlchemy, Django, Pandas, Spring JPA, MyBatis, TypeORM, GORM | knowledge/frameworks/ |
| Migrate from PostgreSQL/MySQL/SQL Server/Mongo/Snowflake | knowledge/migrations/ |
| RAC, Multitenant, Exadata, In-Memory, Data Guard architecture | knowledge/architecture/ |
| Backup/RMAN, Autonomous Recovery Service, Cloud Protect (concepts) | knowledge/backup-recovery/ |
| AQ, DBMS_SCHEDULER, MViews, DBLinks, vector search, SELECT AI | knowledge/features/ |
| SQLcl basics, scripting, Liquibase, formatting, DDL gen, MCP server | knowledge/sqlcl/ |
| ORDS architecture/install/REST/auth/monitoring | knowledge/ords/ |
| OCR container images and selection | knowledge/containers/ |
| ERD, data modeling, partitioning, tablespaces | knowledge/design/ |
| schema migrations, online ops, edition-based redefinition, version control | knowledge/devops/ |
| Data Guard, redo/undo, user management (admin notes) | knowledge/admin/ |
Common Multi-Step Flows (knowledge → action)
| Goal | Sequence |
|---|---|
| Safe schema change | knowledge/agent/schema-discovery → knowledge/agent/destructive-op-guards → knowledge/agent/idempotency-patterns → execute via the relevant action domain (T2 dry-run first) |
| Diagnose a slow query | knowledge/performance/explain-plan → knowledge/performance/wait-events → performance-tuning-diagnostics/ (run AWR/ASH/top-SQL scripts) |
| Recover from media failure | knowledge/backup-recovery/* (concepts) → backup-and-recovery/references/runbooks.md (T3 runbook + approval token) |
| Stand up AI access on a VM | `bootstrap/bootstrap.sh |
| Plan a migration off another DB | knowledge/migrations/migration-assessment → source-specific knowledge/migrations/migrate-* → cloning-refresh-migration/ for cutover mechanics |
Conventions
- Action skills follow
_common/references/conventions.md(tier banner, dry-run default, wallet creds, structured logging, idempotency). Knowledge skills follow Oracle's authoring guide (knowledge/_AUTHORING_GUIDE.md):## Overview→ examples → best practices →## Oracle Version Notes (19c vs 26ai)→## Sources. - Version baseline: 19c is the floor; our action automation is verified on 19c & 23ai; Oracle knowledge notes call out 26ai where newer. Treat version-specific items as verify-before-trust against the running release.
See MANIFEST.md for the full inventory and INSTALL.md for install + VM setup.