Practice Question and Answer

Q: What is the difference between Cursor Stability and Repeatable Read isolation levels? 1304 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

CURSOR STABILITY: - CS is a row level locking - Acquires an exclusive lock on the row that is to be updated - When the control is moved to the next updatable row, the lock is released REPEATABLE READ: - RR is a page level locking - Acquires an exclusive lock on the entire page which is the source of row availability - When the control is moved to the next updatable page the lock is released

Q: What does it mean if the null indicator has -1, 0, -2? 1714 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

-1 indicates the field is null  0 indicates the field is not null  -2 indicates the field is truncated

Q: What does a deadlock mean in DB2? 1935 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

When two independent processes contend for the same resource or the resources reserved by one another, it is called a deadlock. -911 and -913 are the SQLcode for a deadlock.

Q: Name and explain the type of locks? 1013 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

There are three types of lock, namely: Shared – This type of lock permits two or more programs to read from the locked space but does not allow them to change it. Update – This lock is more lenient. It permits the program to read and change the locked space. Exclusive – This lock restricts all users from accessing the locked space.

Q: What is NOTCAT2? 1056 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

It is an MVS message that indicates the presence of a duplicate catalogue in the database. This problem can be fixed by removing one of the entries and then adding a new one.

Q: How can record locking be achieved in those DB2 versions which do not support it? 880 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

It can be done by setting the record length’s size to more than half of the page’s size.

Q: What is the need to code COMMITS in batch programs? 1667 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

COMMIT statements are used to release locks which are required for that unit of work, and then permit a new unit of work. In other words, if COMMITS are not coded in the program and the program has been sent for execution, then while processing, in place of just going back to a few inserts since the nearest commit, the program has to go back to the inserts which were made during the entire run of the program. This extra process takes around twice or thrice the time taken normally.

Q: Why is free space left in KSDS Dataset? 1790 0

  • Show AnswerHide Answer
  • Workspace

Answer :
Explanation :

While allocating KSDS Datasets, free space is declared at regular intervals at the time of initial loading. This is done because this free space is utilized for keeping the data arranged in sequence physically, even though inserted randomly.

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully

      Report Error

    Please Enter Message
    Error Reported Successfully