Recently in our workshop after submitting Load job we are getting error Index re-built. The reason is Load job is failed twice. And Table sapce went to recovery pending status. The below is an issue and resolution happened during DB2 LOAD process.

How to do index rebuild?

The REBUILD INDEX online utility reconstructs indexes or index partitions from the table that they reference.

During the rebuild process, the REBUILD INDEX utility can also create a FlashCopy® image copy of the indexes being rebuilt.

To avoid the cost of running the RUNSTATS utility afterward, you can also specify the STATISTICS option to collect inline statistics when you run the REBUILD INDEX utility.

Restriction:

  • REBUILD INDEX SHRLEVEL CHANGE should only be used to fix a broken or restricted index or to build an index after DEFER.
  • You should not use the REBUILD INDEX SHRLEVEL CHANGE utility to move an index to different volumes; instead, you should use the online REORG utility.
  • REBUILD INDEX SHRLEVEL CHANGE on a unique index will not allow the INSERT option, the DELETE option, or updates that affect the unique index.

Latest from the Blog

AI Agents in Data Engineering: Everything You Need to Know

AI agents are revolutionizing data engineering by automating tasks such as monitoring pipelines, generating SQL queries, and ensuring data quality. They enhance productivity, speed up troubleshooting, and improve data accessibility for users. While offering significant advantages, AI agents also face challenges in security, accuracy, and integration with existing systems.

The End-to-End AI Stack – A Real Guide for Developers to Code, Create, and Execute

Artificial Intelligence tools are on the rise, from writing assistants to coding helpers and automation platforms. However, many professionals struggle to compare these tools effectively. This is where the AI Stack becomes important. Modern AI tools like ChatGPT, NotebookLM, and Antigravity serve different purposes, and understanding their roles helps in: Layer 1: Conversational AI (Thinking…

10 Workplace Communication Speaking Exercises to Improve Fluency at Work

Strong workplace communication is one of the most valuable professional skills today.Whether you’re giving project updates, speaking to clients, or collaborating with teams — the ability to speak clearly and confidently can set you apart. However, many professionals struggle with: One of the best ways to improve is through chunking and pausing. Chunking helps you:✔…

Authorization required

To execute this utility, you must use a privilege set that includes one of the following authorities:

  • RECOVERDB privilege for the database
  • STATS privilege for the database is required if the STATISTICS keyword is specified.
  • DBADM or DBCTRL authority for the database. If the object on which the utility operates is in an implicitly created database, DBADM authority on the implicitly created database or DSNDB04 is required.
  • DATA ACCESS authority
  • System DBADM authority
  • SYSCTRL or SYSADM authority

Index rebuild run in 7 phases:

The REBUILD INDEX utility operates in the following phases: UTILINIT Performs initialization and setup.UNLOADUnloads index entries.SORTSorts unloaded index entries.BUILDBuilds indexes.SORTBLDSorts and builds a tablespace for parallel index build processing.UTILTERMPerforms cleanup.