DbApply

Connects Subversion repository and Oracle database

DbApply tool deploys Oracle scripts managed by Subversion version control system.

Developers keep database structure (tables, packages, functions, etc.) as scripts in Subversion repository. DbApply checks local SVN repository and detects all modified files. Sort them to avoid dependency errors and deploys to Oracle database.

It is simple as it only can be: specify local repository, connect to Oracle database and click Execute

DbApply is a pure Java application and can work almost everywhere

Launch application by:

<dbapply install dir>/dbapply-gui.sh

Then just 3 simple steps:

  • Open local repository. You can open several repositories at the same time if necessary
  • Connect to Oracle database. If DbApply has never worked with this database before it will create few auxiliary objects (2 tables, sequence and package). This is where DbApply keeps info about all scripts revisions.
  • Execute. DbApply checks, sort and executes modified scripts one by one.

If this is a new database or scripts from Svn repository have never been executed against it, DbApply will register Svn branch for this database.

Branch administration

You can view and delete Svn branches registered for database on tab Branches.

Apply scripts to database by:

dbapply-cmd.sh --paths <local svn repository> --encoding <scripts encoding> --database <database connection string>
  • <database connection string>: connection string in format user/password@host:port/sid (e. g. scott/tiger@localhost/orcl)
  • <local svn repository>: one or several space separated path(s) to local repository(-ies)
  • <scripts sources encoding>: scripts encoding. If this option omitted, platform default value will be used

DbApply will filter scripts that need to be applied, sort them in order to avoid dependency errors and execute.

Same as with UI version, application will register Svn branch for target database if necessary.

Branch administration

View the list of Svn branches registered for database

dbapply-cmd.sh --list-branches --database <database connection string>

Delete branch. After that scripts from this repository can no longer be applied.

dbapply --delete-branch <url> --database <database connection string>

Ignored errors

Add reliability to your script - make it possible to execute SQL commands more than once. So if execution goes wrong you will be able to re-run script.

Just specify list of SQL errors that can be ignored in a comment before the command, e.g.

-- ignore_error(code, code, ...)

For example:

-- ignore_error(955) CREATE TABLE a (n NUMBER);

or

/* ignore_error(955) */ CREATE TABLE a (n NUMBER);

Same command but without ignore_error() annotation will be sucessfully executed first time. However second one will fail with "ORA-00955: name is already being used by existing object" exception.

DbApply understands ignore_error( ) annotation and ignores mentioned errors. So command with annotation will complete successfully.

Version 5.0.0.92   Released: November 1, 2018;

System requirements: Java Runtime Environment (JRE) 1.8 or higher.


Download and unpack.

unzip dbapply_5.0.0.92.zip