db2 udb interview questions Archives

DB2 FAQ: This document contains Frequently Asked Questions (FAQ) about the product DB2 for Linux UNIX and Windows. This FAQ covers DB2 Versions 8.x, 9.1, 9.5,9.7,10.1 & 10.5

Basic Interview Questions
  • How to find the number of rows in a DB2 table? …
  • How can the duplicate values be eliminated from DB2 SELECT? …
  • What is Aggregate? …
  • Is it possible using MAX on a CHAR column? …
  • Why SELECT is not preferred in Embedded SQL programs? …
  • When is the LIKE statement used? …
  • How is the value function used?

2 Is it possible to have more than one cursor open for any program?

You might be asked this question to test your knowledge of any potential limitations in DB2. Your answer should be clear and concise.

Example: “Yes, it is possible to have more than one cursor open at any one time in a program.”

2 What is a base table and how is it created?

You might be asked this question to test your knowledge of one of the DB2 tables. Make sure to know what its purpose is and how you can create it before you answer.

Example: “A base table is a physical table that houses real records. It can be created with the SQL CREATE TABLE statement.”

What is a recovery log?

You may encounter this question if the interviewer wants to know whether you understand how the recovery log can be useful. Be sure to accurately define the recovery log and explain its purpose.

Example: “A recovery log keeps track of all changes made in a database. When a system failure occurs, a recovery log can recover the sequence of events that occurred before the failure.”

The best way of putting a CURSOR to use in a COBOL program is to make use of DECLARE CURSOR, which can be used either in procedure division operation or in working storage. This is being done basically to highlight the SELECT statement. Once DECLARE CURSOR is used, this is followed by OPEN, FETCH and finally CLOSE.

26.) Mention a credible reason why SELECT* is never given preference in an SQL program that has been embedded.

The buffer pool is a reserved main storage, which is to satisfy the buffering requirements for one or more table spaces or indexes. It can be made up of either 4K or 32K pages.

STOGROUP is a named collection of DASD volumes, which is to be used by index spaces and table spaces of the database.

Either you can use SELECT statements of single rows or an alternative way is to use CURSOR.

DB2 FAQ: This document contains Frequently Asked Questions (FAQ) about the product DB2 for Linux UNIX and Windows. This FAQ covers DB2 Versions 8.x, 9.1, 9.5,9.7,10.1 & 10.5

FAQ

What is the input to the bind process in DB2?

What is the input to the bind process? DBRM is the input to the bind process which is produced in the pre-compile step.

What is Sqlca in DB2?

A program that contains executable SQL statements and is precompiled with option LANGLEVEL SAA1 (the default) or MIA must provide exactly one SQLCA, though more than one SQLCA is possible by having one SQLCA per thread in a multi-threaded application.

What is the maximum size of a char data type in DB2?

The Db2 precompiler scans a program and copies all of the SQL statements and host variable information into a DBRM (database request module). The precompiler also returns source code that has been modified so that the SQL statements do not cause errors when you compile the program.

What does the DB2 precompiler do?

The Db2 precompiler scans a program and copies all of the SQL statements and host variable information into a DBRM (database request module). The precompiler also returns source code that has been modified so that the SQL statements do not cause errors when you compile the program.

Related Posts

Leave a Reply

Your email address will not be published.