...
Run:
docker pull ibmcom/informix-developer-database
docker run --name ronakInformix -e DBSERVERNAME=dbserver -e LICENSE=accept -e LOCAL=true -p 9088:9088 -e DBA_USER=test -e DBA_PASS=test ibmcom/informix-developer-database
I had to create the testdb for this example, so open a docker bash session (after you run the above docker pull, the output should tell you how to open a docker bash session for this container, ex.
docker exec -it 55e1345371b4 bash
)run:
dbaccess
Select: Database
Select: Create
Create a database called testdb (you will also end up verifying your connection information here, I used
informix:in4mix
, seems like that is the image default)Your database must use ANSI logging, here is the query to create the db (you can do that after you connect to the next section)
CREATE DATABASE ansiDatabase WITH LOG MODE ANSI;
Note, at the time this pulls down IBM Informix Dynamic Server Version 14.10.FC3DE.
...
again, make sure you are in the root of ronak_lb_projects
cd ronak_lb_projects/informix
Make sure you install the jdbc driver for informix in the ronak_lb_projects/drivers folder
verify liquibase.properties file has URL and passwords correct, mine looked like this:
Code Block changeLogFile=infromixlog.xml #### Primary Database Information #### # The primary database is the database you want to use when doing an update, or for performing comparisons. # Enter the URL of the source database url=jdbc:informix-sqli://localhost:9088/testdb:INFORMIXSERVER=dbserver # Enter the username for your source database. username: informix # Enter the password for your source database. password: in4mix classpath: ../drivers/jdbc-4.50.4.1.jar logLevel: ERROR
test by running liquibase updateSQL, I used the following command:
liquibase updateSQL
note because of https://datical.atlassian.net/browse/LB-525 I am having issues updateding the database.if you get the following error, then you probably did not create your db ANSI logging compliant (see above in the docker setup)
Code Block Liquibase Pro 4.0.0 by Datical licensed to Liquibase Pro Customer until Mon May 17 19:00:00 CDT 2021 Starting Liquibase at 15:11:04 (version 4.0.0 #19 built at 2020-07-13 19:45+0000) Unexpected error running Liquibase: Migration failed for change set infromixlog.xml::1595879345576-1::ronak (generated): Reason: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.sql.SQLException: Transactions not supported For more information, please use the --logLevel flag [2020-07-27 15:11:05] SEVERE [liquibase.integration] Unexpected error running Liquibase: Migration failed for change set infromixlog.xml::1595879345576-1::ronak (generated): Reason: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.sql.SQLException: Transactions not supported liquibase.exception.LiquibaseException: liquibase.exception.MigrationFailedException: Migration failed for change set infromixlog.xml::1595879345576-1::ronak (generated): Reason: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.sql.SQLException: Transactions not supported at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:112) at liquibase.Liquibase$1.run(Liquibase.java:206) at liquibase.Scope.lambda$child$0(Scope.java:159) at liquibase.Scope.child(Scope.java:170) at liquibase.Scope.child(Scope.java:158) at liquibase.Scope.child(Scope.java:137) at liquibase.Liquibase.runInScope(Liquibase.java:1790) at liquibase.Liquibase.update(Liquibase.java:183) at liquibase.Liquibase$2.run(Liquibase.java:280) at liquibase.Scope.lambda$child$0(Scope.java:159) at liquibase.Scope.child(Scope.java:170) at liquibase.Scope.child(Scope.java:158) at liquibase.Scope.child(Scope.java:137) at liquibase.Liquibase.runInScope(Liquibase.java:1790) at liquibase.Liquibase.update(Liquibase.java:265) at liquibase.Liquibase.update(Liquibase.java:257) at liquibase.integration.commandline.Main.doMigration(Main.java:1577) at liquibase.integration.commandline.Main$1.lambda$run$0(Main.java:316) at liquibase.Scope.lambda$child$0(Scope.java:159) at liquibase.Scope.child(Scope.java:170) at liquibase.Scope.child(Scope.java:158) at liquibase.Scope.child(Scope.java:137) at liquibase.Scope.child(Scope.java:183) at liquibase.Scope.child(Scope.java:187) at liquibase.integration.commandline.Main$1.run(Main.java:315) at liquibase.integration.commandline.Main$1.run(Main.java:166) at liquibase.Scope.child(Scope.java:170) at liquibase.Scope.child(Scope.java:144) at liquibase.integration.commandline.Main.run(Main.java:166) at liquibase.integration.commandline.Main.main(Main.java:145) Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set infromixlog.xml::1595879345576-1::ronak (generated): Reason: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.sql.SQLException: Transactions not supported at liquibase.changelog.ChangeSet.execute(ChangeSet.java:670) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:49) at liquibase.changelog.ChangeLogIterator$2$1.run(ChangeLogIterator.java:99) at liquibase.Scope.lambda$child$0(Scope.java:159) at liquibase.Scope.child(Scope.java:170) at liquibase.Scope.child(Scope.java:158) at liquibase.Scope.child(Scope.java:137) at liquibase.Scope.child(Scope.java:183) at liquibase.Scope.child(Scope.java:187) at liquibase.changelog.ChangeLogIterator$2.run(ChangeLogIterator.java:91) at liquibase.Scope.lambda$child$0(Scope.java:159) at liquibase.Scope.child(Scope.java:170) at liquibase.Scope.child(Scope.java:158) at liquibase.Scope.child(Scope.java:137) at liquibase.Scope.child(Scope.java:183) at liquibase.Scope.child(Scope.java:187) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:64) ... 29 more Caused by: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.sql.SQLException: Transactions not supported at liquibase.database.AbstractJdbcDatabase.setAutoCommit(AbstractJdbcDatabase.java:1227) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:534) ... 45 more Caused by: liquibase.exception.DatabaseException: java.sql.SQLException: Transactions not supported at liquibase.database.jvm.JdbcConnection.setAutoCommit(JdbcConnection.java:383) at liquibase.database.AbstractJdbcDatabase.setAutoCommit(AbstractJdbcDatabase.java:1225) ... 46 more Caused by: java.sql.SQLException: Transactions not supported at com.informix.util.IfxErrMsg.buildExceptionWithMessage(IfxErrMsg.java:416) at com.informix.util.IfxErrMsg.buildException(IfxErrMsg.java:397) at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:379) at com.informix.jdbc.IfxSqliConnect.setAutoCommit(IfxSqliConnect.java:2185) at liquibase.database.jvm.JdbcConnection.setAutoCommit(JdbcConnection.java:381)
Destroying the Docker Image
...