We have schemas / libraries created directly by OS/400 commands in DB2. Hence journaling will not be enabled by default for any physical file (table) If we would create newly. We are using DB Migration tool like liquibase for all DB changes like table / view creation in spring boot. while trying to insert or update, I am getting error "java.sql.SQLException: [SQL7008] X in TABLE_NAME not valid for operation". This error is due to the journaling not done on the newly created table via liquibase. Now, I am trying to find the below possibilities If available
Please give your comments
When commitment control (transaction isolation) is used, journaling of the tables is required.
You have two options:
For option 1, you can include
transaction isolation=none;
in the connection string, see this question for more detail
For option 2, if you use the SQL CREATE SCHEMA and CREATE TABLE commands, to create the library and files, then the tables will be automatically journaled.
You can also use the Start Journal Library (STRJRNLIB) command after creating a library via the Create Library (CRTLIB) command. Thereafter, when you create a table or physical file in the library it will be journaled automatically.
I had this error and fixed it using iAccess client tool. You can add DB2 journal using IBM i Access client tool. Steps Open the schema , Right click on Tables , then click include on the right click menu.

MYTABLE (the table I want to add journal) will be appeared on the list, then right click on the table name then and go to journaling, now add the values for Journal and library
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With