DB2 Realtime (Scenario based) Interview Questions (21 - 30)
21. If a transaction takes a Update lock on some data, then other transactions can get what type of lock?
Other transactions can get a Shared (S) lock, but not Update (U) or Exclusive (X) locks on the same data.
22. If a transaction takes a Shared lock on some data, then other transactions can get what type of lock?
Other transactions can get Shared or Update locks, but not Exclusive locks on the same data.
23. Which utility is used to load data into a table from a sequential file?
LOAD utility is used to efficiently insert bulk data from a sequential file into a DB2 table.
24. Which utility reclaims space from pages when some rows were deleted?
REORG reorganizes the table and reclaims unused space after deletions, improving performance and storage efficiency.
25. Which utility provides statistical information such as the number of pages and rows and stores them in Catalog tables?
The RUNSTATS utility is used to gather statistics such as the number of pages and rows and stores them in DB2 catalog tables.
26. Which command is used to commit a transaction in CICS program?
EXEC CICS SYNCPOINT is used to commit all updates made by the program and release locks.
27. Which isolation level provides maximum concurrency?
UR (Uncommitted Read) allows access to uncommitted data, enabling highest concurrency but with lowest data integrity.
28. Which isolation level ensures highest data integrity?
RR (Repeatable Read) prevents dirty reads, non-repeatable reads, and phantom reads, offering the strictest data consistency.
29. If a transaction has an exclusive lock on some data, then what are the other types of lock which can be applied on it?
If a transaction holds an Exclusive (X) lock on data, no other locks can be applied to that data by other transactions until the exclusive lock is released.
30. Suppose we added a new column by using ALTER statement, where the column will be added?
When a new column is added using the ALTER TABLE ADD COLUMN statement, it is added at the end of the table structure.