I am trying to migrate data from one oracle db to another. I generated difference between them using:
./liquibase --driver=oracle.jdbc.OracleDriver --url=jdbc:oracle:thin:CMS/[email protected]:1522/ORCL --username=cms --password=password diffChangeLog --referenceDriver=oracle.jdbc.OracleDriver --referenceUrl=jdbc:oracle:thin:CMS/[email protected]:1521/ORCL --referenceUsername=cms --referencePassword=password > dchangelog.xml
Now I generated sql of this dchangelog.xml using updateSQL as below:
<username>cms</username>
<password>password</password>
<url>jdbc:oracle:thin:CMS/[email protected]:1522/ORCL</url>
<execution>
<id>process</id>
<phase>generate-resources</phase>
<goals>
<goal>updateSQL</goal>
</goals>
<configuration>
<username>cms</username>
<password>password</password>
<driver>oracle.jdbc.OracleDriver</driver>
<url>jdbc:oracle:thin:CMS/[email protected]:1522/ORCL</url>
<changeLogFile>${output.change.log.file}.xml</changeLogFile>
<migrationSqlOutputFile>${output.change.log.file}.sql</migrationSqlOutputFile>
<promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
</configuration>
</execution>
What I get in this SQL is just difference of columns, foreign keys, unique constraints, index etc. What I wanted was data which was not generated.
I looked into documentation it says here:
Currently, Liquibase runs the following comparisons:
Version Differences
Missing/unexpected tables
Missing/unexpected views
Missing/unexpected columns
Missing/unexpected primary keys
Missing/unexpected unique constraints
Missing/unexpected foreign Keys
Missing/unexpected sequences
Missing/unexpected indexes
Column definition differences (data type, auto-increment, etc.)
View definition differences
**Data differences (limited), not checked by default**
Is it even supported because if i try to run from command line it gives error:
[ygupta@nrvdevops02 WS]$ ./liquibase --driver=oracle.jdbc.OracleDriver --url=jdbc:oracle:thin:CMS/[email protected]:1522/ORCL --username=cms --password=password diffChangeLog --referenceDriver=oracle.jdbc.OracleDriver --referenceUrl=jdbc:oracle:thin:CMS/[email protected]:1521/ORCL --referenceUsername=cms --referencePassword=password --diffTypes=data Starting Liquibase at Fri, 14 Dec 2018 17:55:18 AEDT (version 3.6.2 built at 2018-07-03 11:28:09) Errors: Including 'diffTypes=data' in the diffChangeLog command has no effect. This option should only be used with the 'generateChangeLog' command.
@SteveDonie