Another example example: db2 uncatalog database my_database
DB20000I The UNCATALOG DATABASE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is
Is it now required "db2 TERMINATE" or is this something else?
So "db2 terminate" should be used:
- before db2stop,
- uncatalog (is it?),
What else? Or how do I know I have to execute "db2 terminate" command?
There is no situation where you must run "db2 terminate". The back-end process caches the catalog, which is why when you change it by adding or removing entries, you get the message to run it. The back-end process may have a connection to a database, which is why it is recommended to terminate it before a dbtstop. What it comes down to, is you need to know what is going on with the system. When you know that, then you know when you need to run it.
Sometimes we should run it.
For example, when we want to switch to another instance (db2 commands can hang for a long time after the switching otherwise) or set another client's codepage in the same session.