YouTube Icon

Interview Questions.

DB2 Interview Questions and Answers - Jul 14, 2022

fluid

DB2 Interview Questions and Answers

Q1. Define DB2.

Ans: DB2 is a Database Management System for the MVS Operating System wherein, DB2 is a subsystem of MVS Operating System.

Q2. Which factor exams DB2 deadlocks?

Ans: Locking services are supplied by means of Locking offerings factor which is called Internal Resource Lock Manager (IRLM) and manages concurrency troubles and lifeless locks.

Q3. What is the motive of the use of COMMIT?

Ans: The statistics changes may be made permanent with the aid of the use of COMMIT. It also lets in records to be accessed by using other packages who can reference the committed data

Q4. List out the Data sorts available.

Ans: The Data kinds to be had right here are:

1. SMALLINT 

2. INTEGER 

three. FLOAT 

4. DECIMAL 

5. CHAR

6. VARCHAR 

7. DATE

eight. TIME 

Q5. What are the makes use of of DB2 Optimizer?

Ans: 

 

It methods SQL statements.

It facilitates to pick the access path

Q6. Define SQLCA.

Ans: SQL Communication Area is a shape of variables, which are updated after each execution of SQL statements. For an software that includes executable SQL statements, handiest one SQLCA is wanted. FORTRAN need a couple of SQLCA to be provided .For Java, SQLCA is not applicable.

200px-Applications-database.Svg

Q7. Define CHECK constraint.

Ans: It is targeted as a situation or criteria to ensure records integrity. A price to be inserted or up to date to a table is tested by using CHECK constraint. The CHECK constraints are created for the duration of the creation of the table.

Q8. Which component exams DB2 deadlocks?

Ans: Locking offerings are provided with the aid of Locking offerings aspect which is known as Internal Resource Lock Manager (IRLM) and manages concurrency troubles and dead locks.

 

Q9. Which issue is liable for execution of SQL statements?

 

Ans: Database services element is accountable for execution of SQL statements and it manages buffer pool also.

Q10. Which thing handles DB2 startup and shutdown?

Ans: System services component handles DB2 startup and shutdown.

 

Q11. On which degree we are able to follow the locks?

 

Ans: Locking may be implemented on either of those − Page, table and desk space.

Q12. In which step we specify the isolation level?

Ans: In Bind step we specify the isolation level.

Q13. What is SQLCA’s most duration?

Ans: 136 is the maximum length of the SQLCA.

Q14. Which area in SQLCA suggests the number of up to date rows after replace announcement?

Ans: Check the cost of SQLERRD to realize how many rows were given up to date after an replace announcement.

Q15. What is the bodily garage length of TIMESTAMP facts type?

Ans: TIMESTAMP information type takes 10 bytes and default is YYYY-MM-DD:HH:MM:SS-NNNNNN

Q16. What is the physical storage length of DATE facts type?

Ans: DATE facts sorts take 4 bytes and default is 'YYYY-MM-DD'

Q17. Which aspect is used to techniques SQL statements and selects the get admission to paths?

Ans: DB2 optimizer is used to select the access paths & to system the SQL queries.

Q18.  In a COBOL-DB2 application all SQL statements have to be coded in Area A. State whether genuine or false?

Ans: This declaration is wrong as SQL statements have to be coded in Area B.

Q19. Cursors are used to deal with unmarried row choices at a time. They are statistics shape which hold all the results of a query. State whether actual or false?

Ans: This declaration is wrong as cursors are used to address a couple of row selections at a time.

Q20. Host variables cannot be group items but they may be grouped collectively in host structure. They can be Renamed or Redefined. State whether or not genuine or fake?

Ans: This announcement is wrong as host variables can't be renamed & redefined.

Q21. List out the buffer pools in DB2

Ans: There are four buffer pools in DB2 and they're:

BP0

BP1

BP2

BP32

Q22. Define clustering index.

Ans: Clustering index is a kind of index, which locates the desk rows and determines how to organization the rows collectively within the tablespace.

Q23. What is concurrency?

Ans: More than one DB2 utility method can get entry to the equal facts at the equal time, is known as concurrency. However, troubles can show up such as, lost updates get entry to to unrepeatable reads and uncommitted information.

Q24. Explain the Function completed via statistics manager?

Ans: Data manager can be considered as a issue this is able to coping with the databases which are bodily gift and is capable of invoking other components associated with the system for performing functionalities like logging, locking and in appearing different I/O operations.

Q25. What takes place in BIND step in a DB2 software?

Ans: Bind step converts all of the SQL statements into executable form in COBOL-DB2 software.

Q26. What does a fine SQL code shows?

Ans: A terrible SQL code shows a failure whilst a superb one shows an exception.

Q27. Which announcement is used to revoke the get admission to from a database?

Ans: REVOKE declaration is used to eliminate the permissions from a Database.

Q28. Which assertion is used to authorize get entry to on database tables?

Ans: GRANT keyword is used to provide privileges on DB2 tables.




CFG