https://github.com/syjer/liquibaseorausertable
Liquibase "extension" that work around the slowness during startup on oracle database with lot of users/tables.
https://github.com/syjer/liquibaseorausertable
liquibase oracle
Last synced: 8 days ago
JSON representation
Liquibase "extension" that work around the slowness during startup on oracle database with lot of users/tables.
- Host: GitHub
- URL: https://github.com/syjer/liquibaseorausertable
- Owner: syjer
- License: apache-2.0
- Created: 2021-05-31T19:07:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-18T13:28:49.000Z (almost 2 years ago)
- Last Synced: 2025-04-21T12:45:05.261Z (6 months ago)
- Topics: liquibase, oracle
- Language: Java
- Homepage:
- Size: 67.4 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# liquibaseorausertable
[](https://github.com/syjer/liquibaseorausertable/actions/workflows/maven.yml)
## Reason
If you are using liquibase on an oracle db with _a lot_ of users and tables, you may have noticed that
running the application, even without any changes is extremely slow at start time.This is due to the following issue: https://github.com/liquibase/liquibase/issues/1312 .
This is a workaround project for handling this problem by avoiding the problematic calls in the normal code path.
## Maven coordinates:
If you are using liquibase version 4.23.0+ (see issue https://github.com/syjer/liquibaseorausertable/issues/4 , thanks @PascalSchumacher for the PR)
```
ch.digitalfondue.liquibaseorausertable
liquibaseorausertable
2.0.0```
If you are using an older version of liquibase:
```
ch.digitalfondue.liquibaseorausertable
liquibaseorausertable
1.9```
## Configuration
You can configure the query for checking the existence of a table by defining the **system property**:
```
orausertable.hasTableNamedQueryInAll=false|true
```
Possible values:
- `false` is the default, the query will search in the USER_TABLES table.
- `true` the query will search in the ALL_TABLESThis is useful when doing migrations with a different user than the one of the application.
## Notes
Most of the code, is simply taken from the main liquibase repository at https://github.com/liquibase/liquibase, and thus under the term of the following license (apache v2.0): https://github.com/liquibase/liquibase/blob/master/LICENSE.txt .
My modifications/additions are also under Apache v2.0 license.
This project has a custom LockService and ChangeLogHistoryService that are not doing any call on the oracle ALL_ tables.
This mean that any "database snapshotting" functionality will still be slow.To run test, you need an oracle service (docker / podman):
> docker run --rm --name oracle-xe-slim -p 1521:1521 -e ORACLE_RANDOM_PASSWORD=true -e APP_USER=test -e APP_USER_PASSWORD=test gvenzl/oracle-xe:11-slim