If you are interested in the ideas behind this project and more in-depth knowledge about PATO, you may want to buy my e-book "How to Build an Oracle Database Application", Leanpub.
This project contains:
- Maven build software for deploying Oracle software (database and Apex).
- Apex and database tools installed by the build software.
See the various POM files.
There is also a Python GUI for PATO as an alternative for the Maven command line.
And finally for CI/CD purposes there is a Jenkins CI/CD setup in the jenkins
folder, but please read the book for more information.
A set of application tools for Oracle developers.
Currently it includes:
- a PL/SQL DDL generator (that can be used to describe your deployment).
- an Apex application to load spreadsheet files into a database table/view.
- a table partition package to make it easy to drop (and backup) old partitions.
- ADMIN packages to kill sessions and stop jobs.
- a Do It Yourself message subsystem as a replacement for Oracle Query Notification.
- a heartbeat mechanism for keeping related processes (jobs) alive or shut them down gracefully.
- various PL/SQL utilities to help with development.
See the folder db/app/ddl
.
The following MIME spreadsheet types (with extension between parentheses) are supported:
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (.xlsx)
- application/vnd.ms-excel (.xls)
- application/vnd.ms-excel.sheet.binary.macroEnabled.12 (.xlsb)
- application/vnd.oasis.opendocument.spreadsheet (.ods)
This project depends on the ExcelTable GitHub project.
See also the folder db/app/ext
for the back-end part.
See the files for package DATA_PARTITIONING_PKG
in folder db/app/data/src/full
.
When a job session is blocking due to DBMS_AQ.listen
or similar calls, it is not sufficient to stop the jobs using DBMS_SCHEDULER.stop_job
since the slave session process may keep on running somehow. The packages ADMIN_SYSTEM_PKG
and ADMIN_SCHEDULER_PKG
will really stop the job and kill the session (only for the session user).
See folder db/app/admin/src/full
.
A Object Oriented based message subsystem where you can either decide to process a message now (synchronous) or later (asynchronous). It uses Oracle Advanced Queuing and Oracle Scheduler jobs to achieve this.
Oracle Query Notification was deemed to be too limited (only PL/SQL notifications, registration difficult, etcetera).
See the files in folder db/app/msg/src/full
.
The message subsystem has supervisor and worker jobs that listen on the various queues. In order to gracefully shut them down and to keep them running when one process is accidently stopped or killed, this heartbeat mechanism based on DBMS_PIPE
has been built.
See the files for package API_HEARTBEAT_PKG
in folder db/app/api/src/full
.
Utilities to enable/disable constraints, manage Apex messages and so on.
See the sub folders in db/app
.
The installation of an Oracle database and Oracle APEX is out of scope.
Creating the database schema(s) for the ExcelTable and tools software is out of scope.
The proposed database schema for installing PATO is ORACLE_TOOLS.
See the ExcelTable README for further instructions.
When the PATO database schema differs from this ExcelTable schema then you must grant privileges like this:
SQL> grant execute on ExcelTable to <PATO database schema>;
First clone the project:
$ git clone https://github.com/paulissoft/oracle-tools.git
$ cd oracle-tools/tools/db
$ mvn -Pdb-install -Ddb=<db from oracle-tools/conf/src> -Ddb.schema=<username> -Ddb.password=<password>
$ cd oracle-tools/tools/apex
$ mvn -Papex-import -Ddb=<db from oracle-tools/conf/src> -Ddb.schema=<username> -Ddb.password=<password>
This is an example file layout:
.../projects/oracle-tools
.../projects/YOUR-PROJECT
The .../projects/YOUR-PROJECT/db/pom.xml may have as parent:
<parent>
<groupId>com.paulissoft.pato</groupId>
<artifactId>db</artifactId>
<version>${revision}</version>
<relativePath>../../oracle-tools/db</relativePath>
</parent>
The .../projects/YOUR-PROJECT/apex/pom.xml may have as parent:
<parent>
<groupId>com.paulissoft.pato</groupId>
<artifactId>apex</artifactId>
<version>${revision}</version>
<relativePath>../../oracle-tools/apex</relativePath>
</parent>
This is deprecated since it is too fragile. see also Remove Maven dependency mechanism for use in other projects from the documentation.