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
Ingesting Data from AWS S3 into Databricks with Auto Loader: Building a Medallion Architecture
In this blog post, we will explore efficient methods for ingesting data from Amazon S3 into Databricks using Auto Loader. Additionally, we will discuss how to perform data transformations and implement a Medallion architecture to improve the management and processing of large datasets. What is the Medallion Architecture? The Medallion architecture is a data modeling…
Building Scalable Data Pipelines with dlt-meta: A Metadata-Driven Approach on Databricks
Build scalable data pipelines using Databricks dlt-meta. Learn how metadata-driven pipelines simplify ingestion, governance, and automation across bronze and silver layers.
Exploring Databricks Unity Catalog – System Tables and Information _Schema: Use Cases
Databricks Unity Catalog offers a unified governance solution for managing structured data across the Databricks Lakehouse platform. It enables organizations to implement fine-grained access controls, auditing, and monitoring, enhancing data governance and compliance. Key functionalities include centralized metadata management, data discovery, dynamic reporting, and data lineage tracking, optimizing performance and collaboration.
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.






