RDS Oracle Diagnostics
When to use
Any RDS Oracle investigation where the console alone is insufficient — instance launch failures, performance degradation, Oracle wait events, connectivity issues, TNS errors, parameter tuning, backup/recovery, replication, migration, encryption, or upgrade troubleshooting.
Investigation workflow
Step 1 — Collect and triage
aws rds describe-db-instances --db-instance-identifier <instance-id>
aws rds describe-events --source-identifier <instance-id> --source-type db-instance --duration 1440
aws rds describe-db-log-files --db-instance-identifier <instance-id>
aws rds download-db-log-file-portion --db-instance-identifier <instance-id> --log-file-name trace/alert_<SID>.log
aws rds describe-db-parameters --db-parameter-group-name <param-group>
aws rds describe-option-groups --option-group-name <option-group>
Step 2 — Performance deep dive
aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name CPUUtilization \
--dimensions Name=DBInstanceIdentifier,Value=<instance-id> \
--start-time <start> --end-time <end> --period 300 --statistics Average
aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name FreeableMemory ...
aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name ReadIOPS ...
aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name WriteIOPS ...
aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name ReadLatency ...
aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name WriteLatency ...
aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name DatabaseConnections ...
aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name FreeStorageSpace ...
aws pi get-resource-metrics --service-type RDS \
--identifier db-<resource-id> \
--metric-queries '[{"Metric":"db.load.avg"}]' \
--start-time <start> --end-time <end> --period-in-seconds 300
Step 3 — Oracle-specific diagnostics (via SQL)
-- Active sessions and wait events
SELECT sid, serial#, username, status, event, wait_class, seconds_in_wait
FROM v$session WHERE status = 'ACTIVE' AND username IS NOT NULL;
-- SGA/PGA memory usage
SELECT component, current_size/1024/1024 AS mb FROM v$sga_dynamic_components;
SELECT name, value/1024/1024 AS mb FROM v$pgastat WHERE name IN ('total PGA allocated','maximum PGA allocated');
-- Top SQL by elapsed time
SELECT sql_id, elapsed_time/1000000 AS elapsed_sec, executions, buffer_gets
FROM v$sql ORDER BY elapsed_time DESC FETCH FIRST 10 ROWS ONLY;
-- Tablespace usage
SELECT tablespace_name, ROUND(used_percent,2) AS pct_used FROM dba_tablespace_usage_metrics;
Read references/rds-oracle-guardrails.md before concluding on any RDS Oracle issue.
Tool quick reference
| Tool / API |
When to use |
describe-db-instances |
Instance config, engine version, storage, Multi-AZ |
describe-events |
Recent RDS events and notifications |
describe-db-parameters |
Parameter group settings |
describe-option-groups |
Oracle option group features (TDE, SSL, etc.) |
download-db-log-file-portion |
Alert log, trace files, listener log |
describe-db-snapshots |
Backup and snapshot status |
describe-db-log-files |
List available log files |
CloudWatch CPUUtilization |
CPU usage and saturation |
CloudWatch FreeableMemory |
Available memory (SGA/PGA pressure) |
CloudWatch ReadIOPS/WriteIOPS |
I/O throughput |
CloudWatch ReadLatency/WriteLatency |
I/O latency |
CloudWatch DatabaseConnections |
Connection count |
Performance Insights |
DB load, wait events, top SQL |
v$session |
Active sessions and wait events |
v$sga_dynamic_components |
SGA memory allocation |
v$pgastat |
PGA memory statistics |
v$sql |
SQL performance statistics |
Gotchas: RDS Oracle
- Oracle licensing on RDS: License Included (SE2 only) or BYOL (SE2 and EE). BYOL requires existing Oracle licenses with Software Update License & Support. Verify license model before launch.
- Oracle-specific parameter groups: key parameters include
processes, sessions, sga_target, pga_aggregate_target, open_cursors, db_files. RDS manages some parameters automatically — not all init.ora parameters are modifiable.
- No RAC on RDS. Oracle Real Application Clusters is not supported. For high availability, use Multi-AZ (which uses Oracle Data Guard under the hood).
- No customer-managed Data Guard. Multi-AZ uses Data Guard internally but you cannot configure standby databases, switchover, or failover manually. RDS manages it.
- No ASM (Automatic Storage Management). RDS uses EBS volumes exclusively. No raw devices, no ASM disk groups.
- Character set (AL32UTF8 default) cannot be changed after instance creation. Plan character set requirements before launch. National character set (AL16UTF16) is also immutable.
- Oracle editions: SE2 (Standard Edition Two) supports up to 16 vCPUs. EE (Enterprise Edition) required for partitioning, Advanced Compression, Advanced Security (TDE), Active Data Guard (read replicas).
- Oracle storage: EBS only (gp2, gp3, io1, io2). No raw devices. Storage autoscaling available. Maximum 64 TiB.
- Oracle Statspack available on all editions. AWR (Automatic Workload Repository) requires EE with Diagnostics Pack license. Use Statspack on SE2.
- Oracle Data Pump (expdp/impdp) for migration: use the
DBMS_DATAPUMP PL/SQL package via the RDS-provided wrapper procedures in the rdsadmin schema. No OS-level access to run expdp/impdp directly.
- Oracle-specific CloudWatch metrics:
CPUUtilization, FreeableMemory, ReadIOPS, WriteIOPS, ReadLatency, WriteLatency, DatabaseConnections, FreeStorageSpace, SwapUsage. Enhanced Monitoring provides OS-level metrics.
- Oracle SSL/TLS: two options — Oracle Native Network Encryption (via option group, no certificates needed) or SSL (requires certificates, option group configuration). Native encryption is simpler but SSL provides certificate-based authentication.
- Oracle TDE (Transparent Data Encryption): requires EE with Advanced Security option. Uses AWS KMS or CloudHSM for key management. Configured via option group. Tablespace-level or column-level encryption.
- Oracle backup: automated backups use storage-level snapshots, not RMAN. You cannot access RMAN directly. For logical backups, use Data Pump via
rdsadmin procedures.
- Oracle version upgrade paths: not all versions can upgrade directly. Check
describe-db-engine-versions --engine oracle-ee --engine-version <current> for valid upgrade targets. Major version upgrades may require parameter group changes.
- Multi-AZ uses Oracle Data Guard (physical standby) under the hood. Failover is automatic. Typical failover time is 1-2 minutes. DNS endpoint stays the same.
- Read replicas use Active Data Guard and require Enterprise Edition. Read replicas are available in same region or cross-region. They use the same endpoint pattern but with a different identifier.
Oracle edition comparison
| Feature |
SE2 |
EE |
| Max vCPUs |
16 |
No limit |
| Partitioning |
No |
Yes |
| Advanced Compression |
No |
Yes |
| TDE |
No |
Yes |
| Active Data Guard (read replicas) |
No |
Yes |
| Diagnostics Pack (AWR) |
No |
Yes |
| Tuning Pack |
No |
Yes |
| OLAP |
No |
Yes |
| Label Security |
No |
Yes |
Anti-hallucination rules
- Always cite specific AWS CLI output, CloudWatch metrics, Performance Insights data, or Oracle SQL query results as evidence.
- RAC is NOT available on RDS. Never suggest RAC configuration or RAC-specific troubleshooting.
- RMAN is NOT directly accessible on RDS. Never suggest running RMAN commands. Use automated backups and Data Pump via
rdsadmin.
- Character set cannot be changed after creation. Never suggest ALTER DATABASE CHARACTER SET on RDS.
- Multi-AZ Data Guard is managed by RDS. Never suggest manual Data Guard configuration, switchover, or failover commands.
- Spend no more than 2 minutes on any single hypothesis. Pivot if inconclusive.
30 runbooks
| Category |
IDs |
Covers |
| A — Instance |
A1-A3 |
Launch failures, instance class issues, storage issues |
| B — Performance |
B1-B4 |
High CPU/wait events, memory pressure (SGA/PGA), I/O bottleneck, Oracle-specific waits |
| C — Connectivity |
C1-C3 |
Connection failures, TNS issues, listener issues |
| D — Parameters |
D1-D3 |
Parameter group issues, Oracle init parameters, session/process limits |
| E — Backup & Recovery |
E1-E3 |
Automated backup failures, snapshot restore, point-in-time recovery |
| F — Replication |
F1-F2 |
Read replica issues, Multi-AZ failover |
| G — Migration |
G1-G3 |
Data Pump issues, DMS issues, character set problems |
| H — Security |
H1-H3 |
TDE issues, SSL/native encryption, Oracle audit |
| I — Maintenance |
I1-I2 |
Version upgrades, patching |
| Z — Catch-All |
Z1 |
General troubleshooting |
1---2name: rds-oracle-diagnostics3description: Use this skill to investigate and troubleshoot Amazon RDS for Oracle problems by analyzing instance configurations, performance metrics, connectivity, parameter groups, and following structured runbooks. Activate when: launch failures, instance class issues, storage problems, high CPU or Oracle wait events, SGA/PGA memory pressure, I/O bottlenecks, connection failures, TNS errors, listener issues, parameter group problems, Oracle init parameter tuning, session/process limits, backup failures, snapshot restore, point-in-time recovery, read replica issues, Multi-AZ failover, Data Pump migration, DMS issues, character set problems, TDE encryption, SSL/native network encryption, Oracle audit, version upgrades, patching, or the user says something is wrong with RDS Oracle without naming specific symptoms.4---56# RDS Oracle Diagnostics78## When to use910Any RDS Oracle investigation where the console alone is insufficient — instance launch failures, performance degradation, Oracle wait events, connectivity issues, TNS errors, parameter tuning, backup/recovery, replication, migration, encryption, or upgrade troubleshooting.1112## Investigation workflow1314### Step 1 — Collect and triage1516```17aws rds describe-db-instances --db-instance-identifier <instance-id>18aws rds describe-events --source-identifier <instance-id> --source-type db-instance --duration 144019aws rds describe-db-log-files --db-instance-identifier <instance-id>20aws rds download-db-log-file-portion --db-instance-identifier <instance-id> --log-file-name trace/alert_<SID>.log21aws rds describe-db-parameters --db-parameter-group-name <param-group>22aws rds describe-option-groups --option-group-name <option-group>23```2425### Step 2 — Performance deep dive2627```28aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name CPUUtilization \29 --dimensions Name=DBInstanceIdentifier,Value=<instance-id> \30 --start-time <start> --end-time <end> --period 300 --statistics Average31aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name FreeableMemory ...32aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name ReadIOPS ...33aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name WriteIOPS ...34aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name ReadLatency ...35aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name WriteLatency ...36aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name DatabaseConnections ...37aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name FreeStorageSpace ...38aws pi get-resource-metrics --service-type RDS \39 --identifier db-<resource-id> \40 --metric-queries '[{"Metric":"db.load.avg"}]' \41 --start-time <start> --end-time <end> --period-in-seconds 30042```4344### Step 3 — Oracle-specific diagnostics (via SQL)4546```sql47-- Active sessions and wait events48SELECT sid, serial#, username, status, event, wait_class, seconds_in_wait49FROM v$session WHERE status = 'ACTIVE' AND username IS NOT NULL;5051-- SGA/PGA memory usage52SELECT component, current_size/1024/1024 AS mb FROM v$sga_dynamic_components;53SELECT name, value/1024/1024 AS mb FROM v$pgastat WHERE name IN ('total PGA allocated','maximum PGA allocated');5455-- Top SQL by elapsed time56SELECT sql_id, elapsed_time/1000000 AS elapsed_sec, executions, buffer_gets57FROM v$sql ORDER BY elapsed_time DESC FETCH FIRST 10 ROWS ONLY;5859-- Tablespace usage60SELECT tablespace_name, ROUND(used_percent,2) AS pct_used FROM dba_tablespace_usage_metrics;61```6263Read `references/rds-oracle-guardrails.md` before concluding on any RDS Oracle issue.6465## Tool quick reference6667| Tool / API | When to use |68|------------|-------------|69| `describe-db-instances` | Instance config, engine version, storage, Multi-AZ |70| `describe-events` | Recent RDS events and notifications |71| `describe-db-parameters` | Parameter group settings |72| `describe-option-groups` | Oracle option group features (TDE, SSL, etc.) |73| `download-db-log-file-portion` | Alert log, trace files, listener log |74| `describe-db-snapshots` | Backup and snapshot status |75| `describe-db-log-files` | List available log files |76| `CloudWatch CPUUtilization` | CPU usage and saturation |77| `CloudWatch FreeableMemory` | Available memory (SGA/PGA pressure) |78| `CloudWatch ReadIOPS/WriteIOPS` | I/O throughput |79| `CloudWatch ReadLatency/WriteLatency` | I/O latency |80| `CloudWatch DatabaseConnections` | Connection count |81| `Performance Insights` | DB load, wait events, top SQL |82| `v$session` | Active sessions and wait events |83| `v$sga_dynamic_components` | SGA memory allocation |84| `v$pgastat` | PGA memory statistics |85| `v$sql` | SQL performance statistics |8687## Gotchas: RDS Oracle8889- Oracle licensing on RDS: License Included (SE2 only) or BYOL (SE2 and EE). BYOL requires existing Oracle licenses with Software Update License & Support. Verify license model before launch.90- Oracle-specific parameter groups: key parameters include `processes`, `sessions`, `sga_target`, `pga_aggregate_target`, `open_cursors`, `db_files`. RDS manages some parameters automatically — not all init.ora parameters are modifiable.91- No RAC on RDS. Oracle Real Application Clusters is not supported. For high availability, use Multi-AZ (which uses Oracle Data Guard under the hood).92- No customer-managed Data Guard. Multi-AZ uses Data Guard internally but you cannot configure standby databases, switchover, or failover manually. RDS manages it.93- No ASM (Automatic Storage Management). RDS uses EBS volumes exclusively. No raw devices, no ASM disk groups.94- Character set (AL32UTF8 default) cannot be changed after instance creation. Plan character set requirements before launch. National character set (AL16UTF16) is also immutable.95- Oracle editions: SE2 (Standard Edition Two) supports up to 16 vCPUs. EE (Enterprise Edition) required for partitioning, Advanced Compression, Advanced Security (TDE), Active Data Guard (read replicas).96- Oracle storage: EBS only (gp2, gp3, io1, io2). No raw devices. Storage autoscaling available. Maximum 64 TiB.97- Oracle Statspack available on all editions. AWR (Automatic Workload Repository) requires EE with Diagnostics Pack license. Use Statspack on SE2.98- Oracle Data Pump (expdp/impdp) for migration: use the `DBMS_DATAPUMP` PL/SQL package via the RDS-provided wrapper procedures in the `rdsadmin` schema. No OS-level access to run expdp/impdp directly.99- Oracle-specific CloudWatch metrics: `CPUUtilization`, `FreeableMemory`, `ReadIOPS`, `WriteIOPS`, `ReadLatency`, `WriteLatency`, `DatabaseConnections`, `FreeStorageSpace`, `SwapUsage`. Enhanced Monitoring provides OS-level metrics.100- Oracle SSL/TLS: two options — Oracle Native Network Encryption (via option group, no certificates needed) or SSL (requires certificates, option group configuration). Native encryption is simpler but SSL provides certificate-based authentication.101- Oracle TDE (Transparent Data Encryption): requires EE with Advanced Security option. Uses AWS KMS or CloudHSM for key management. Configured via option group. Tablespace-level or column-level encryption.102- Oracle backup: automated backups use storage-level snapshots, not RMAN. You cannot access RMAN directly. For logical backups, use Data Pump via `rdsadmin` procedures.103- Oracle version upgrade paths: not all versions can upgrade directly. Check `describe-db-engine-versions --engine oracle-ee --engine-version <current>` for valid upgrade targets. Major version upgrades may require parameter group changes.104- Multi-AZ uses Oracle Data Guard (physical standby) under the hood. Failover is automatic. Typical failover time is 1-2 minutes. DNS endpoint stays the same.105- Read replicas use Active Data Guard and require Enterprise Edition. Read replicas are available in same region or cross-region. They use the same endpoint pattern but with a different identifier.106107### Oracle edition comparison108109| Feature | SE2 | EE |110|---------|-----|----|111| Max vCPUs | 16 | No limit |112| Partitioning | No | Yes |113| Advanced Compression | No | Yes |114| TDE | No | Yes |115| Active Data Guard (read replicas) | No | Yes |116| Diagnostics Pack (AWR) | No | Yes |117| Tuning Pack | No | Yes |118| OLAP | No | Yes |119| Label Security | No | Yes |120121## Anti-hallucination rules1221231. Always cite specific AWS CLI output, CloudWatch metrics, Performance Insights data, or Oracle SQL query results as evidence.1242. RAC is NOT available on RDS. Never suggest RAC configuration or RAC-specific troubleshooting.1253. RMAN is NOT directly accessible on RDS. Never suggest running RMAN commands. Use automated backups and Data Pump via `rdsadmin`.1264. Character set cannot be changed after creation. Never suggest ALTER DATABASE CHARACTER SET on RDS.1275. Multi-AZ Data Guard is managed by RDS. Never suggest manual Data Guard configuration, switchover, or failover commands.1286. Spend no more than 2 minutes on any single hypothesis. Pivot if inconclusive.129130## 30 runbooks131132| Category | IDs | Covers |133|----------|-----|--------|134| A — Instance | A1-A3 | Launch failures, instance class issues, storage issues |135| B — Performance | B1-B4 | High CPU/wait events, memory pressure (SGA/PGA), I/O bottleneck, Oracle-specific waits |136| C — Connectivity | C1-C3 | Connection failures, TNS issues, listener issues |137| D — Parameters | D1-D3 | Parameter group issues, Oracle init parameters, session/process limits |138| E — Backup & Recovery | E1-E3 | Automated backup failures, snapshot restore, point-in-time recovery |139| F — Replication | F1-F2 | Read replica issues, Multi-AZ failover |140| G — Migration | G1-G3 | Data Pump issues, DMS issues, character set problems |141| H — Security | H1-H3 | TDE issues, SSL/native encryption, Oracle audit |142| I — Maintenance | I1-I2 | Version upgrades, patching |143| Z — Catch-All | Z1 | General troubleshooting |