Mandalika has Published 470 Articles

What is NON CLUSTERED INDEX in DB2? Explain with the help of practical example

Mandalika

Mandalika

Updated on 14-Sep-2020 10:47:33

570 Views

The non-clustered index is just the opposite of the clustered index. In a non-clustered index, it is not necessary that the data rows having similar index keys should reside in the same page. This index is suitable if we have to traverse through the table.For example, if we take the ... Read More

What is CLUSTERED INDEX in DB2? Explain with the help of practical example.

Mandalika

Mandalika

Updated on 14-Sep-2020 10:44:23

1K+ Views

In a CLUSTERED INDEX of a DB2 table, the data rows (table rows) with the similar index keys are stored in the same page. For example, If we have 4 index keys - T5623, T5611, Z9786 and Z9078. So the data rows with similar keys T5623 and T5611 will be ... Read More

How to update of incorrect timestamp format in a DB2 table?

Mandalika

Mandalika

Updated on 14-Sep-2020 10:39:59

402 Views

As per the standard DB2 definitions, timestamp holds 10 bytes in DB2 storage and 26 bytes in corresponding COBOL storage (PIC X(26)). It is in the format YYYY-MM-DDHH. MM.SS.NNNNNN. Where, YYYY:- Year | MM:- Month | DD:- Date | HH:- Hour | MM:- Minutes | SS:- Seconds | NNNNNN:- MillisecondsAs ... Read More

How to update DB2 table with a duplicate primary key?

Mandalika

Mandalika

Updated on 14-Sep-2020 10:29:11

911 Views

To maintain the integrity of a DB2 table the primary key is always unique in the entire table. For example, if we have a DB2 table ORDERS which stores all the orders and the primary key of the table is column ORDER_ID. Then there can be only a single row ... Read More

Give the panel command to start a specific tablespace within a DB2 database.

Mandalika

Mandalika

Updated on 12-Sep-2020 16:22:37

157 Views

To start a specific tablespace within a DB2 database we can use below panel command.START DATABASE (DSNDB01) SPACENAM(TABSPAC1)Using the START DATABASE command, we can also start database and indexspace.

Give and explain the panel command to display all the components of DB2 database DSNDB01 along with their status?

Mandalika

Mandalika

Updated on 12-Sep-2020 16:21:26

128 Views

A database contains multiple components like tablespace, indexspace, index, tables, etc. We can find out all the components within the database using the below panel command.DIS DB(DSNDB01)

What are the ways to calculate DB2 database size using DB2 utility and other methods?

Mandalika

Mandalika

Updated on 12-Sep-2020 16:17:53

742 Views

There are multiple ways in which we can estimate the size of the DB2 database. Few of them are listed below−By using inbuilt get_dbsize_info function.By using DB2 active transaction logs.The size of the dataset which was used with UNLOAD utility can be checked.Table/Index dataUsing STOSPACE utility in JCL as below//STEP1 ... Read More

How to repair a pending state of an index IDX1?

Mandalika

Mandalika

Updated on 12-Sep-2020 16:16:08

474 Views

The pending state is set when the image copy is required for the table space or when the INDEX is in rebuild status. In this case a COPY PENDING/ REBUILD PENDING flag is set. We can repair this state by using the below JCL step.//STEP010 EXEC DSNUPROC REPAIR SET INDEX ... Read More

How to reorganize the DB2 tablespace TABSPAC1 to reclaim fragmented space?

Mandalika

Mandalika

Updated on 12-Sep-2020 15:23:19

498 Views

The tablespace reorganization is used to reorganize the data present in the system in order to reclaim the free space. This free space can be utilized to store the new data and therefore reorganization is very useful from a memory utilization point of view. We can reorganize any tablespace using ... Read More

Updating and sampling of catalog statistics for DB2 tablespace

Mandalika

Mandalika

Updated on 12-Sep-2020 15:14:21

236 Views

The DB2 RUNSTAT utility records the details of tablespace, table, index, etc in the system catalog. The RUNSTAT generates the data like space available in table space, indexes, access paths, etc. We can use the below JCL step to update the catalog statistics of DB2 tablespace TABSPAC2 and to sample ... Read More

Advertisements