I used "alter table <tablename> activate not logged initially ".
When I tired to delete some of the recordes in that table, the logs are get updated. But I think the logs should not get updated because i have alterted the table to NOT LOGGED mode.
par:/db2t_logs/dbs8140$db2 "select * from bmc.test" bmc.test"
You have to do the "ALTER TABLE..." statement and all other statements (DELETE, UPDATE, INSERT) in the same Unit of Work (UOW). A UOW is, in DB2, basically from one commit/rollback to the next. It looks like you are executing you commands from the CLP. This has autocommit ON by default, which commits each statement. You need to turn autocommit off using:
UPDATE COMMAND OPTIONS using C OFF
You will also have to manually issue the COMMIT statement when you are done.
Thanks for your prompt reply..
db2 "alter table bmc.test activate not logged initially" ,transcation should not be logged in Logs files though if autocommit is on. Is this correct statment..?
No. If autocommit is on, then when you issue the ALTER TABLE command a commit is automatically sent (hence "autocommit") thus ending your UOW. The next statement will begin a second UOW and will be logged.