Repository navigation
0.2.0
PL/Pilot 0.2.0 adds tools to analyse, measure and test PL/SQL, keeps the agent in your schema, and makes it noticeably faster with large packages, slow databases and long sessions.
Highlights
Analyse, measure, test
- Impact analysis (
find_dependencies): shows what uses an object, level by level, down to the source lines that use a single column.recompile_invalidnames the objects a change invalidated and recompiles them. - Error stacks (
resolve_error_stack): pasteORA-06512lines (in any language) or aDBMS_UTILITY.FORMAT_CALL_STACK, and PL/Pilot shows the source line and the subprogram of every frame. Line numbers of triggers are converted to source lines. - Measuring instead of guessing (
measure_sql, used by/optimize):- runs a statement and reports rows, elapsed and CPU time;
- with read access to the V$ views it also shows the actual execution plan (estimated vs. actual rows per step) and the session statistics;
- compares a rewrite with the original and checks that both return the same rows;
- measures
INSERT/UPDATE/DELETE/MERGEonly with your approval and rolls them back afterwards.
- Unit tests (
run_unit_tests, used by/test): writes utPLSQL test packages, runs them, and reports failed tests and code coverage. Without utPLSQL it opens a test block in a Test window.
Better PL/SQL
- Compiler warnings: the agent's compiles run with
PLSQL_WARNINGSenabled (except noisy ones such as PLW-05018), and the agent sees the warnings. Setting Compiler Warnings. - Compiler settings are kept: when the agent replaces a unit, it keeps its
PLSQL_CCFLAGS, optimization level, native compilation and debug information. This also applies toCREATE OR REPLACEthroughexecute_sql. - Knows your database: the Oracle version and the NLS settings of the connection (for example the decimal comma) are part of the model's context, and table descriptions include optimizer statistics.
- Oracle syntax only: the model is told to write Oracle SQL and PL/SQL (no
ON CONFLICT,LIMIT,::casts and the like); small models drifted into PostgreSQL syntax. execute_sqlrefuses several statements in one call before you are asked to approve them.
Stays in your schema
- The agent works in the schema you work in. It qualifies objects of other schemas (
HR.EMPLOYEES) instead of switching. - If it has to switch the session's schema, PL/Pilot switches it back at the end of the request, also after Stop, and tells you in the chat.
- With Separate Session off, each request starts in the schema your own windows use.
Faster
- Large packages:
- source is read as joined rows on the server: a 2,700-line package body needs 2 network round trips instead of 110. This also speeds up the backup before every compile;
get_object_sourcereads only what fits into one answer and acceptsstart_line/end_line;- when a unit is too long, the answer says so at the top and lists the procedures and functions it did not show, with their line numbers, so the model can read exactly the part it needs.
- Long sessions: old tool outputs are shortened in one bigger step instead of a little on every step, so the LLM server can keep reusing its prompt cache. In the test, the start of the conversation changed on 3 of 20 steps instead of 9.
- Prompt cache in the log: each model turn in
agent.logshows how much of the prompt the server took from its cache (prompt cache 6768/6818 tokens (99 %)). Near 0 % on later steps means your server has no prompt caching. Turning it on is the biggest single speed-up. - Slow queries:
- before each query of the agent, PL/Pilot reads Oracle's runtime estimate (
EXPLAIN PLAN, the query is not executed for that and no transaction is touched); - at 60 seconds or more you are asked first, because a running statement cannot be stopped. Setting Confirm Slow Queries (0 = never ask). Helper agents don't run such queries;
- the row limit is passed into the query, so Oracle can stop early (a sorted query: 0.95 s → 0.35 s in the test);
- runtimes of a second or more are reported to the model;
- helper agents that run the identical query at the same time share one execution.
- before each query of the agent, PL/Pilot reads Oracle's runtime estimate (
@suggestions: typing@looks up matching objects in the database. To avoid these queries, switch off Suggest Objects After @.@NAMEstill attaches the object when you send the message.
Model and server
- Context window detection: Test and a model change ask the server for the model's context window (vLLM, OpenRouter, llama.cpp, LM Studio; Ollama after the model's first answer) and set Context Window. A value larger than the server's real window would let it silently cut off the start of the conversation. Setting Detect Context Window.
- Loop protection: a model that keeps repeating the same text is stopped, with a notice.
Fixes
- The plug-in's questions, such as commit or rollback when closing PL/SQL Developer, now use their own dialog. In PL/SQL Developer's dark theme the text of standard Windows message boxes was invisible.
Upgrading
- Close PL/SQL Developer.
- Download
PLPilot.zipbelow, extract it and runpowershell -ExecutionPolicy Bypass -File .\install.ps1again.
Settings, chats and backups are kept. New settings and their defaults:
| Setting | Default |
|---|---|
| Detect Context Window | on |
| Compiler Warnings | on |
| Suggest Objects After @ | on |
| Confirm Slow Queries | 60 s |
For actual execution plans in measure_sql, ask your DBA for SELECT_CATALOG_ROLE (or SELECT on V$SQL, V$SQL_PLAN_STATISTICS_ALL, V$MYSTAT and V$STATNAME).
New installation: see the quick start. Requirements are unchanged.
Known limitations
- A plug-in still cannot interrupt a statement that is already running; Stop only stops waiting for it.
- Oracle's runtime estimate is rough (in the test, 5 s estimated for a query that took 0.9 s). Oracle cannot explain queries on dictionary views without extra privileges; those queries run without the check.
- Without access to the V$ views,
measure_sqlreports only rows, elapsed and CPU time. - Unchanged from 0.1.0: Windows and 64-bit PL/SQL Developer only; only characters of the Windows ANSI code page (1252); rewind information is lost when PL/SQL Developer is closed; read-only is not a hard guarantee.
Please read the safety model before using PL/Pilot on databases that matter. Report security problems privately as described in SECURITY.md.
MIT licensed. The package includes WebView2 and Newtonsoft.Json; their licenses are in THIRD-PARTY-NOTICES.md. PL/Pilot is an independent project and is not affiliated with Allround Automations or Oracle.