---
title: "Discussion on \"[Mastering Oracle SQLcl Liquibase - Part 3/3] - Synchronize your existing environments\" | Hashnode"
description: "Discussion on \"[Mastering Oracle SQLcl Liquibase - Part 3/3] - Synchronize your existing environments\". In previous parts, you've learned how to start using SQLcl Liquibase with a new database and then track your database changes made after.\nIn this part, I will show you how to synchronize your existing"
url: "https://hashnode.com/posts/episode-33-synchronize-your-existing-environments-and-start-using-sqlcl-liquibase/65095eacb8c416459711578d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [\[Mastering Oracle SQLcl Liquibase - Part 3/3\] - Synchronize your existing environments](https://rafal.hashnode.dev/episode-33-synchronize-your-existing-environments-and-start-using-sqlcl-liquibase?utm_source=hashnode&utm_medium=feed)

In previous parts, you've learned how to start using SQLcl Liquibase with a new database and then track your database changes made after. In this part, I will show you how to synchronize your existing

Sep 19, 2023 · 4 min read · rafal.hashnode.dev  
Updated May 28  
Read the article

-   [#oracle](https://hashnode.com/tag/oracle)
-   [#databases](https://hashnode.com/tag/databases)
-   [#oracle-database](https://hashnode.com/tag/oracle-database)
-   [#sqlcl](https://hashnode.com/tag/sqlcl)
-   [#liquibase](https://hashnode.com/tag/liquibase)

## Written by

[Rafal Grzegorczyk](https://hashnode.com/@rgrzegorczyk)

@rgrzegorczyk · Kielce, POLAND

  
[View profile](https://hashnode.com/@rgrzegorczyk)

Oracle APEX & PL/SQL Developer at Pretius Low-Code

Oracle APEX &amp; PL/SQL Developer with 10 years of experience in IT, including financial systems for government administration, energy, banking and logistics industry. Enthusiast of database automation. Oracle ACE Associate. Certified Liquibase database versioning tool fan. Speaker at Kscope, APEX World, SOUG, HrOUG, POUG and DOAG. Likes swimming in icy cold lakes in winter and playing basketball.

## Responses 1

Markdown supported · ⌘↵ to post

[Richard Sylvester](https://hashnode.com/@risylv)

[Mar 12, 2024](https://hashnode.com/posts/episode-33-synchronize-your-existing-environments-and-start-using-sqlcl-liquibase/65095eacb8c416459711578d/comment/65f0a169da55346f9f2e51db)

Hi Rafal, thanks for the detailed explanation of how to use Liquibase on an existing environment.

Let's say I have a dev environment with 105 tables of which 5 of them are used by developers to try out new features and rest 100 tables I would like to keep in sync in UAT. What would be the best approach?

[Rafal Grzegorczyk](https://hashnode.com/@rgrzegorczyk)

[Mar 12, 2024](https://hashnode.com/posts/episode-33-synchronize-your-existing-environments-and-start-using-sqlcl-liquibase/65095eacb8c416459711578d/comment/65f0a169da55346f9f2e51db#reply-65f0a704ff88c61e6258f3e7)

Hi Richard! Thanks for asking. The answer is: it depends :) I would see some approaches for that:

1.  Every developer cleans his mess before you will run the generate-schema command versus DEV and then update to UAT ( so you don't have those tables then)
2.  Manually remove those changesets (with those 5 not needed tables) from files generated by generate-schema and then update to UAT
3.  You run generate-schema only at the beginning of your journey with SQLcl Liquibase. After that, every developer creates his changesets and commits them to git. Those 5 tables will not be added there, so they will not be deployed to UAT during the update.
4.  After running generate-schema on DEV, edit the changesets with those 5 tables and add a tag contexts="DEV\_ONLY" ( or any other name ). When deploying to UAT, use liquibase update -changelog-file controller.xml contexts="!DEV\_ONLY." Thanks to that, changes with contexts DEV\_ONLY will not be deployed.

And a few more approaches, I suppose. Hope it helps. Rafal

[Richard Sylvester](https://hashnode.com/@risylv)

[Mar 12, 2024](https://hashnode.com/posts/episode-33-synchronize-your-existing-environments-and-start-using-sqlcl-liquibase/65095eacb8c416459711578d/comment/65f0a169da55346f9f2e51db#reply-65f0abc3279cd93ed451ece7)

[Rafal Grzegorczyk](https://hashnode.com/@rgrzegorczyk) Thanks again for the suggestions. I think point #4 would be a great idea to add tags and using it while updating the UAT environment.

Trying to get started on a DEV environment where there are 100s of temp tables created as part of nightly processing every day. :-)
