Follow the instructions below to properly extract your PL/SQL package, procedure, and function source code. This ensures the AI engine can analyse your Oracle environment accurately and consistently.
.zip is processed in memory only.
It is never written to the server file system and is automatically removed after your report is generated.
Run the following SQL query in Oracle to retrieve all PL/SQL objects from the your_schema_owner schema:
SELECT
(CASE WHEN line = 1 THEN 'CREATE OR REPLACE ' || text ELSE text END) AS code_line
FROM all_source
WHERE owner = 'your_schema_owner'
AND type IN ('PROCEDURE', 'FUNCTION', 'PACKAGE', 'PACKAGE BODY')
ORDER BY name, type, line;
The CREATE OR REPLACE prefix is added only to the first line of every object so the exported code can be re-imported cleanly.
Your goal is to produce a clean, plain text file where each line corresponds exactly to one
CODE_LINE entry. Not SQL INSERT statements, not Loader format ā just raw PL/SQL text.
DBeaver cannot generate clean output using SQL export. Instead, export as text:
CODE_LINE column..sql ā the content remains correct plain text.
Run this in SQL Developer Worksheet to generate a clean output file:
SET PAGESIZE 0
SET LONG 2000000
SET LONGCHUNKSIZE 2000000
SET LINESIZE 2000
SET FEEDBACK OFF
SET TRIMSPOOL ON
SET TERMOUT OFF
SPOOL your_schema_owner_export.sql
SELECT
(CASE WHEN line = 1 THEN 'CREATE OR REPLACE ' || text ELSE text END)
FROM all_source
WHERE owner = 'your_schema_owner'
AND type IN ('PROCEDURE', 'FUNCTION', 'PACKAGE', 'PACKAGE BODY')
ORDER BY name, type, line;
SPOOL OFF
Compress the generated your_schema_owner_export.sql file into a .zip archive
(example: your_schema_owner_code.zip) and upload it using the
"1. Upload ZIP" button in the assessment form.