Hello,
I have a scenario where we are migrating from Oracle DB to Postgres Sql, i know i can generate a changelog from Oracle schema using liquibase maven plugin and can use the same to create my schema in Postgres. What i want to know is if its possible to copy the data from oracle to postgres too using liquibase. If so, how to do it.
Any help is much appreciated.
It will be hosted on sap cloud and i am integrating liquibase inside our application which is built on spring boot 2.2
Thank you. So, even if we use HANA, then liquibase should work without any issues right?. Also, can i generate data using mvn liquibase:generateChangeLog -Dliquibase.diffTypes=data and use the sql or xml or yml that gets generated to run the liquibase migration along with schema,
say first have scripts to create schemas in changelog and then insert the data during startup.
Sure, will have a look on HANA . But when i run this command in our project
mvn liquibase:generateChangeLog -Dliquibase.diffTypes=data , it is generating a sql file which contains all the insert statements for the data available in DB. I am specifying the target DB type in the file name of my output file in my liquibase.properties file.
I am using the same sql file to run the insert statements on the targeted DB using liquibase after all scripts for schema creation are done.
Let me know if i am doing anything wrong.
I came across this solution from stackoverflow for the same question which i had posted there on data migration.
Also, when liquibase 4.0 releases in few weeks, will that have support for HANA? instead of we building the jar using the github project and building the package ourselves and adding it into liquibase/lib directory.
Sure thank you, will have a look at the syntax to be on the safer side but i dont think there would be any issues as if schemas are created properly then data should be inserted. Also, I am trying to run my app instance against the PostgreSQL by generating the inserts from liquibase and running with the schema changelog. Will let you know if it works fine.
Also, can you confirm me if HANA support will be available from 4.0 as our first choice was HANA and since it was not there in the supported DB list in your website we moved to PostgreSQL. But, if you say that 4.0 will have HANA supoort then i think its worth the wait.
Thank you for the confirmation. Any idea on when that will be released?
Where will your PostgreSQL database be hosted? AWS Database Migration Service is pretty good with replicating data.
The schema creation in DMS is…lacking. So,you’ll definitely want to test that.
Of course, you could migrate from Oracle to PostgreSQL in AWS and then migrate the data from there. Of course, if it’s in AWS, you’ll have all sorts of support over there to help you.
Let us know if that helps!
Cool. Only thing we’ve done with SAP Cloud is make sure the SAP HANA extension works with HANA Cloud.
BUT, I do know that the cloud folks have solution architects available as part of their offering. Maybe contact your account owner at SAP and tell them you need help migrating data and are using Liquibase to manage the schema.
I imagine if you tell them you’re dumping Oracle they would pretty excited to help. Ha!
We just got a big update to the SAP HANA extension from SAP themselves. There’s a couple of caveats. One, you have to build it yourself.
git clone https://github.com/liquibase/hana-liquibase.git
mvn package
Look in target for the jar and put it in your liqubase/lib directory.
Second caveat is that it currently works with 3.6.3. We are planning on it working with Liquibase 4.0 which is set for release in a few weeks.
So, check that out and let us know how it works regarding schema updates on HANA.
Looking at the comment below, I’m editing my statement about Liquibase and data. That’s ignorance on my part. Let me look into this…
Cool? Let us know!
Hey, good catch on the I’ve had good luck with “docker run postgres” to get a PostgreSQL instance locally.
Absolutely confirmed. The new SAP provided HANA extension will work with Liquibase 4.0. Our very own, Nathan Voxland, Benevolent Dictator for Life and Liquibase Founder, is on that.
He’d already gotten the older HANA extension working with 4.0 and is working on getting that support added to the new HANA extension. You can see the older one here: https://github.com/liquibase/liquibase-hanadb-backup. Check the PR’s. But that would be an academic exercise, if you care.
No date chosen, but it’s weeks away. That sound good?
That sounds good. Thank you!!