-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DB2Z support to Flyway Community DB Support #44
Conversation
@Barry-RG Do you expect any action from my side at this moment? |
Not at this point. Thank you |
/** | ||
* The database name for DB2 on z/OS (required for DB2 on z/OS) | ||
*/ | ||
private String databaseName = ""; | ||
/** | ||
* The SQLID for DB2 on z/OS (does not necessarily match with schema) | ||
*/ | ||
private String sqlId = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gahoekstraibm Would you be able to give us a little more explanation on these configuration so that we can add them to the documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
databaseName (mandatory)
For DB2 for z/OS, as part of the JDBC URL, the DB2 location name is included which identifies a specific DB2 subsystem. Additionally, DB2 for z/OS also knows the concept of a "database name", which is used as a namespace for storage objects like tablespaces, similar to what a schema is for tables and indexes.
sqlId (optional)
Besides the database schema, DB2 for z/OS also uses an SQLID, which is the user under which it will create objects like tables etc. As creator, this user will get all rights on the object. If not explicitly set, the DB2z community support plugin will use the schema name as SQLID.
@gahoekstraibm We have started shipping the DB2zOS integration with Flyway. We have yet to push the documentation as we were wondering if you would be able to try the new release and confirm its still as working as expected? |
Hi @Barry-RG , I took the latest command line client from the Redgate website (10.18.0) and after some fiddling with the TOML configuration, I managed to have flyway creating database objects on DB2 for z/OS. However, for some reason, it looks like the db2z plugin's DB2ZJdbcTemplate is not being used for CALL statements, while this is working in my local 9.x fork of flyway. I get the exception below, which shows that the regular JdbcTemplate is trying to execute the CALL statement, and although detectStatement identifies it as DB2Z CALL statement, it looks like it isn't created as DB2ZCallProcedureParsedStatement (in DB2ZParser.createStatement() ). Actually, I think DB2ZParser.createStatement() is not even called :
|
@gahoekstraibm Thank you for trying. I think the error is due to an API drift between the OSS and Redgate editions of Flyway. |
@Barry-RG The OSS version of Flyway 10.18.0 works fine. |
@gahoekstraibm we have made the changes to apply to all versions of Flyway. Would you mind trying with our latest release? |
Hi @Barry-RG , also the latest release is working fine now! |
I just created a new PR to update supported DB2z versions: #62 |
This is to transfer flyway/flyway#3577 from flyway/flyway to the Community DB Support repository.
Thank you @gahoekstraibm for all your help.