Question
Cause
Answer
- Index rebuilding is not logged ( LOGINDEXBUILD=NO), then index rebuilding replayed.
- Index rebuilding is logged ( LOGINDEXBUILD=YES), then index rebuilding replayed but INDEXREC is set as ACCESS_NO_REDO or RESTART_NO_REDO.
- Failed offline reorg, or such failed offline reorg is replayed.
- db2dart runs with /MI option.
- There are one or more indexes marked invalid when a database restarts. i,e. Run RESTART DB with INDEXREC=RESTART
- Someone access an index marked as invalid.
- Run classic REORG TABLE command
- Run REORG INDEXES or REORG INDEX command
- Run CREATE INDEX statement
- Run LOAD command, and it uses REBUILD option as INDEXING MODE
- Run IMPORT or LOAD command with REPLACE option
- Run TRAUNCATE TABLE statement
db2 "select tabschema, tabname, indname, datapartitionid, index_partitioning from table(sysproc.admin_get_index_info('','','')) as t where index_requires_rebuild='Y'"
The restart database command rebuild all the indexes set as INDEX_REQUIRES_REBUILD=Y
db2 restart database <database_name>
db2 reorg indexes all on table <table_name> allow no access
db2 connect to <database_name>
db2 update db cfg using LOGINDEXBUILD YES
https://www.ibm.com/support/pages/db2-causes-mark-index-invalid-and-how-recover-indexes
'Db2 > Db2 reference' 카테고리의 다른 글
How to find long-running uncommitted transactions. (0) | 2020.02.08 |
---|---|
DB2 11버전 표시 의미 (0) | 2018.03.13 |
How many concurrently running statements allowed for a DB2 Java application and how to increase it? (0) | 2015.05.07 |
Collecting explain data for SQL stored procedures in DB2 (0) | 2014.12.15 |
Moving DB2 instances and database between filesystems (0) | 2014.10.31 |