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.
Download wallets from origin and target databases.
Create 2 git repos in Visual Builder and put the corresponding wallet on each repo.
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:
Test build for target database. Verify logs and artefacts archived:
Create a job for the target database as follows:
Test the job for the target database, see how changes are applied after artifacts are dowloaded.
Create a pipeline:
Should you make some changes in your development source database, ejecute the pipeline and verify your changes are applied.
create table invictus.detete_me as select sysdate as fecha from dual
Seems it worked!
That’s all, hope it helps!! 🙂