SQLcl and Liquibase can work together to easy the propagation of changes between schemas either in the same database instance or in different ones.
In this post we are automating the propagation of changes between 2 autonomous databases using Visual Builder.
The solution is simple, a first job connects to the source database (with credentials of the schema we want to update in target) using SQLcl step and store the xml files generated by liquibase with the artefacts archiver. A second job copies the artifacts archived by job1, connects with schema credentials to target database and applies liquibase update. Finally, we create a pipeline to do the job all together.
First part of the tale is here.
STEP 1
Download wallets from origin and target databases.

STEP 2
Create 2 git repos in Visual Builder and put the corresponding wallet on each repo.

STEP 3
Create a job for the origin database as follows:


Configure Step SQLcl. Please note that the connection string is one of the tnsnames alias in the wallet, other connection strings can be set up depending on the database flavor, in this case we are using autonomous:

Add After Build Artefact Archiver:

STEP 4
Test build for target database. Verify logs and artefacts archived:



STEP 5
Create a job for the target database as follows:


STEP 6
Test the job for the target database, see how changes are applied after artifacts are dowloaded.

STEP 7
Create a pipeline:

STEP 8
Should you make some changes in your development source database, ejecute the pipeline and verify your changes are applied.
In source:
create table invictus.detete_me as select sysdate as fecha from dual
Launch pipeline:






Seems it worked!
That’s all, hope it helps!! 🙂