| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This tool exports Oracle database objects (packages, stored procedures, triggers, etc.) to SQL files. This helps with searching, AI usage and version control.
Create a config.properties file in the same directory as the jar (or in the root directory of the project). See config.properties.example.
Use the VS Code launch config, or run the tool with:
java -jar dbexport.jarOptionally you can pass a config file on the command line:
java -jar dbexport.jar path/to/config.propertiesThe tool will:
Note that files for objects that are no longer in the database will be removed from the output directory.
The files are saved in the following structure:
database/
package/
my_package.sql (package body)
my_package_header.sql (package header)
trigger/
my_trigger.sql
procedure/
my_procedure.sql
table/
my_table.sql (DDL including indexes and grants)
view/
my_view.sql (DDL including grants)
domainvalues/
my_table_data.sql (INSERT statements)
Each SQL file begins with create or replace or appropriate DDL statements and can be used directly to recreate the object in the database.
If you export two databases to two different output directories (e.g. database_prod and database_test), you can generate a readable patch with:
git diff --no-index -w --ignore-blank-lines --relative database_prod database_test > db.patchThis compares the generated SQL files without requiring them to be tracked in a git repository. This can be very useful for preparing for a production deploy, or for making sure your testing DB is not too different from production.
mvn clean package| Back | FazBrowse Home | New Git URL |