Say I have a C# script that creates 50 tables in MYLIB.
Currently, after running the script, I have to go into System i Navigator and manually attach the MYLIB/USRJRN to each of the tables' journaling.
How can I make my script do this instead?
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.Sign up to join this community
If you create your library via the SQL
CREATE SCHEMA command, then it will include a journal and journal receivers and all tables created in it will automatically be journaled.
Also, IBM offers the Start Journal Library (STRJRNLIB) command which lets you start default journaling on an existing library.
See also Automatically starting journaling for information about using QDFTJRN to start automatically start journaling.