Przejdź do treści
Biblioteka skilli
Dane i analityka · Budowanie i kod

oracle

/oracle

Wspiera pracę z Oracle Database: PL/SQL, optymalizator kosztowy, partycjonowanie, RAC i Data Guard, przy pisaniu SQL, zarządzaniu schematami i optymalizacji obciążeń OLTP.

Repozytorium
Agent-Skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
01.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 01.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Wspiera pracę z Oracle Database: PL/SQL, optymalizator kosztowy, partycjonowanie, RAC i Data Guard, przy pisaniu SQL, zarządzaniu schematami i optymalizacji obciążeń OLTP.

Oryginalny opis (EN)

Expert Oracle Database assistance covering PL/SQL, cost-based optimizer, partitioning, RAC, and Data Guard. Use when writing enterprise SQL, managing Oracle schemas, or optimizing heavy OLTP workloads.

Jak działa

  1. When to Use
  2. Quick Start
  3. Core Concepts
  4. Common Patterns
  5. Best Practices
  6. Troubleshooting
  7. References
Sekcje z nagłówków SKILL.md, w oryginale · 126 linii, 621 słów
Podgląd SKILL.md
---
name: oracle
description: Expert Oracle Database assistance covering PL/SQL, cost-based optimizer, partitioning, RAC, and Data Guard. Use when writing enterprise SQL, managing Oracle schemas, or optimizing heavy OLTP workloads.
---

# Oracle Database

Oracle Database is a multi-model database management system. It is the de-facto standard for Fortune 500 mission-critical systems due to its reliability, scalability (RAC), and PL/SQL power.

## When to Use

- **Mission-Critical Global Enterprise OLTP**: Running Tier-1 core banking, telecommunications, ERP, and supply chain workloads.
- **Oracle Real Application Clusters (RAC)**: Achieving active-active shared-everything database clustering and transparent failover.
- **Advanced PL/SQL Procedural Logic**: Executing complex enterprise business rules, packages, and triggers directly inside the database.
- **Multitenant Pluggable Databases (PDB)**: Consolidating hundreds of isolated tenant databases under a single Container Database (CDB).

## Quick Start

```sql
-- Implicit cursor loop in PL/SQL
BEGIN
  FOR r IN (SELECT first_name, last_name FROM employees WHERE department_id = 10)
  LOOP
    DBMS_OUTPUT.PUT_LINE(r.first_name || ' ' || r.last_name);
  END LOOP;
END;
/
```

## Core Concepts

### Multitenant Architecture (CDB and PDBs)

One Container Database (CDB) manages system memory and background processes; Pluggable Databases (PDBs) run independently:

```text
[ Container Database (CDB$ROOT) ]
        ├── [ Pluggable DB: PDB_FINANCE ]
        ├── [ Pluggable DB: PDB_HR ]
        └── [ Pluggable DB: PDB_COMMERCE ]
```

### PL/SQL Stored Packages & Transaction Management

Encapsulates procedural business logic with compiled database performance:

```sql
CREATE OR REPLACE PACKAGE BODY FinancialOps AS
    PROCEDURE TransferFunds(
        p_from_acc IN NUMBER,
        p_to_acc   IN NUMBER,
        p_amount   IN NUMBER
    ) IS
    BEGIN
        UPDATE Accounts SET Balance = Balance - p_amount WHERE AccountId = p_from_acc;
        UPDATE Accounts SET Balance = Balance + p_amount WHERE AccountId = p_to_acc;
        COMMIT;
    EXCEPTION
        WHEN OTHERS THEN
            ROLLBACK;
            RAISE_APPLICATION_ERROR(-20001, 'Fund transfer failed: ' || SQLERRM);
    END TransferFunds;
END FinancialOps;
/
```

### Automatic Workload Repository (AWR) & ASH

Comprehensive database performance monitoring and execution profiling:

```sql
-- Generate AWR Performance Snapshot
EXEC DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT();
```

## Common Patterns

### Bulk Data Processing with PL/SQL FORALL and BULK COLLECT

**Problem**: Processing thousands of rows row-by-row in PL/SQL creates massive context-switch overhead between SQL and PL/SQL engines.

**Solution**:
Use `BULK COLLECT` and `FORALL` for batch processing:

```sql
DECLARE
  TYPE t_emp_list IS TABLE OF employees%ROWTYPE;
  v_emps t_emp_list;
BEGIN
  -- Batch collect into memory
  SELECT * BULK COLLECT INTO v_emps FROM employees WHERE status = 'PENDING';

  -- Batch update in a single engine context switch
  FORALL i IN 1..v_emps.COUNT
    UPDATE employees
    SET status = 'PROCESSED', processed_date = SYSDATE
    WHERE employee_id = v_emps(i).employee_id;

  COMMIT;
END;
/
```

## Best Practices

**Do**:

- Use Bind Variables Everywhere: Bind variables (`:val`) prevent hard parsing, reduce latch contention, and stop SQL injection.
- Analyze AWR Reports Regularly: Inspect the "Top 5 Timed Events" in AWR to identify I/O bottlenecks and locking contention.
- Implement Partitioning for Massive Tables: Partition multi-terabyte tables by range or hash to enable partition pruning.
- Use Automatic Memory Management (AMM): Allow Oracle to balance PGA (work areas) and SGA (buffer cache/shared pool) dynamically.

**Don't**:

- Hardcode literals in production queries: Literal strings force Oracle to recompile and pollute the Shared Pool with distinct execution plans.
- Commit inside iterative row loops: Committing row-by-row causes `ORA-01555 Snapshot Too Old` errors and redo log thrashing.
- Ignore index monitoring: Drop unused indexes to reclaim storage and reduce write lock overhead.

## Troubleshooting

| Error                                                        | Cause                                                                | Solution                                                                             |
| :----------------------------------------------------------- | :------------------------------------------------------------------- | :----------------------------------------------------------------------------------- |
| `ORA-01555: snapshot too old`                                | Rollback segments/undo tablespace overwritten by long-running query. | Increase `UNDO_RETENTION` and resize undo tablespace.                                |
| `ORA-00054: resource busy and acquire with NOWAIT specified` | Table locked by another active uncommitted DDL or DML transaction.   | Wait for transaction to complete or identify blocking session via `V$LOCKED_OBJECT`. |
| `ORA-01653: unable to extend table ... in tablespace`        | Tablespace is full or max datafile size reached.                     | Add a new datafile or enable `AUTOEXTEND ON` for tablespace.                         |

## References

- [Oracle Database 23ai Documentation](https://docs.oracle.com/en/database/oracle/oracle-database/)

Wersje

RepozytoriumWynikLicencja
Ta strona · G1Joshi/Agent-Skills100MIT
x85446/claudecodetricks100MIT
claude-dev-suite/claude-dev-suite100MIT
ialameh/sift-coder100MIT
edmundmiller/dotfiles90MIT
dkbnull/hello-skill86MIT

Migawka bazy z 28.10.2026 · wersja paczki 59a6d370cc8a (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100oracle-expert
    Wspiera pracę z Oracle Database: programowanie PL/SQL, Oracle RAC, Data Guard, strojenie wydajności, kopie zapasowe i odtwarzanie oraz administrację korporacyjnymi bazami danych.
  • 90oracle-database-expert
    Wspiera inżynierię Oracle Database 23ai i Autonomous Database: projekt schematów, strojenie SQL i PL/SQL, AI Vector Search, JSON Relational Duality, partycjonowanie, wysoką dostępność i bezpieczeństwo.
  • 90oracle-db-specialist
    Doradza w SQL, PL/SQL, ORDS, wydajności, bezpieczeństwie i migracjach Oracle Database w wersjach 19c, 21c i 23ai.
  • 80role-database:relational-databases
    Pomaga strojić i obsługiwać relacyjne bazy SQL, np. PostgreSQL, MySQL, Oracle lub SQL Server, w produkcji.
  • 84analyze-oracle-schema
    Analizuje schemat Oracle i tworzy raport w Markdown: tabele, wyzwalacze, typy, kod PL/SQL i zależności.
  • 100bigquery
    Wspiera pracę z Google Cloud BigQuery: standardowy SQL, partycjonowanie, klastrowanie, optymalizację kosztów i ML, przy analizach na ogromnych zbiorach i projektowaniu hurtowni danych.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.