This collection of skills aids in Oracle Database administration, SQL and PL/SQL development, performance tuning, and security. It is designed for database administrators and developers who need comprehensive guidance on various Oracle Database topics.
$ npx skills add https://github.com/oracle/skills --skill dbOracle Database Skills provide comprehensive guidance for database administrators and developers working with Oracle databases. The skill set covers SQL and PL/SQL development, database administration, performance tuning using AWR and ASH analysis, security management including VPD and encryption, and safe agent-database operations. It includes support for SQLcl, ORDS, Liquibase, multiple language drivers (Java, Python, .NET, Node.js), and framework integrations like SQLAlchemy and Spring JPA. The skills guide users through complex tasks including query optimization, schema migrations, backup and recovery strategies, multitenant and RAC configurations, and secure database access patterns for AI agents.
Install the skill using the provided command and choose specific files as needed.
Database administration and management
SQL and PL/SQL development
Performance tuning of Oracle databases
Security management for database applications
$ npx skills add https://github.com/oracle/skills --skill dbgit clone https://github.com/oracle/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as an Oracle Database expert. Help me with [TASK] in my [COMPANY]'s Oracle Database environment. The database is [VERSION] and the [SCHEMA/TABLESPACE/USER] involved is [NAME]. Provide step-by-step instructions, code snippets, and best practices. If [ERROR_MESSAGE] occurs, explain the root cause and solution. Focus on [PERFORMANCE/SECURITY/RECOVERY] aspects.
# Oracle Database Performance Tuning: Slow Query Analysis
## Issue Summary
A critical financial report query in `FINANCE_SCHEMA` is running for 12+ minutes instead of the expected 2 minutes. The query joins `TRANSACTIONS`, `ACCOUNTS`, and `CUSTOMERS` tables with a WHERE clause filtering for Q1 2023 data.
## Root Cause Analysis
1. **Execution Plan**: Full table scans on `TRANSACTIONS` (2.4M rows) due to missing index on `transaction_date`
2. **Statistics**: Outdated table statistics (last gathered 6 months ago)
3. **Bind Variables**: Hard-coded values causing suboptimal plan generation
## Recommended Solutions
### Immediate Fix (5 minutes)
```sql
-- Create index on frequently filtered column
CREATE INDEX idx_trans_date ON TRANSACTIONS(transaction_date) TABLESPACE FINANCE_IDX;
-- Gather fresh statistics
EXEC DBMS_STATS.GATHER_TABLE_STATS('FINANCE_SCHEMA', 'TRANSACTIONS');
```
### Query Optimization (10 minutes)
```sql
-- Replace hard-coded values with bind variables
SELECT /*+ GATHER_PLAN_STATISTICS */
a.account_id, c.customer_name, SUM(t.amount)
FROM TRANSACTIONS t
JOIN ACCOUNTS a ON t.account_id = a.account_id
JOIN CUSTOMERS c ON a.customer_id = c.customer_id
WHERE t.transaction_date BETWEEN TO_DATE('2023-01-01', 'YYYY-MM-DD')
AND TO_DATE('2023-03-31', 'YYYY-MM-DD')
GROUP BY a.account_id, c.customer_name;
```
### Monitoring
```sql
-- Check query performance after changes
SELECT sql_id, elapsed_time, cpu_time, buffer_gets
FROM v$sql WHERE sql_text LIKE '%FINANCE_SCHEMA%';
```
## Expected Outcome
- Query should complete in under 2 minutes after implementing both fixes
- CPU usage reduced from 95% to <30%
- Buffer gets reduced from 15M to 500K
## Verification Steps
1. Run the query with timing enabled:
```sql
SET TIMING ON;
SET AUTOTRACE ON;
```
2. Compare execution plans before/after changes
3. Monitor AWR reports for 24 hours post-deploymentTake a free 3-minute scan and get personalized AI skill recommendations.
Take free scan