YouTube Icon

Interview Questions.

Top 100+ Db2 Sql Programming Interview Questions And Answers - May 29, 2020

fluid

Top 100+ Db2 Sql Programming Interview Questions And Answers

Question 1. Define Db2?

Answer :

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

Question 2. What Is The Purpose Of Using Commit?

Answer :

The records modifications may be made everlasting by means of using COMMIT. It additionally lets in information to be accessed by way of different packages who can reference the committed information.

PL/SQL Interview Questions
Question 3. List Out The Data Types Available?

Answer :

The Data types to be had here are:

SMALLINT
INTEGER
FLOAT
DECIMAL
CHAR
VARCHAR
DATE
TIME
Question 4. What Are The Uses Of Db2 Optimizer?

Answer :

It processes SQL statements.
It allows to choose the get right of entry to route
IBM DB2 Tutorial
Question 5. Define Sqlca?

Answer :

SQL Communication Area is a shape of variables, which can be updated after each execution of SQL statements. For an software that contains executable SQL statements, most effective one SQLCA is needed. FORTRAN want a couple of SQLCA to be supplied .For Java, SQLCA isn't relevant.

IBM DB2 Interview Questions
Question 6. Define Check Constraint?

Answer :

It is precise as a circumstance or criteria to make sure facts integrity. A value to be inserted or up to date to a table is examined through CHECK constraint. The CHECK constraints are created in the course of the advent of the table.

Question 7. What Is Sqlca’s Maximum Length?

Answer :

136 is the most period of the SQLCA.

COBOL Tutorial Oracle Interview Questions
Question eight. Discuss About Db2 Bind?

Answer :

The procedure that builds get entry to paths to the DB2 desk is known as bind. The bind uses Database Request Modules  from the DB2 pre-collect step as enter and produces an software plan. It tests for person authentication and validates SQL statements in the DBRM(s).

Question 9. List Out The Three Types Of Page Locks That Can Be Held?

Answer :

Exclusive
Update
Share.
COBOL Interview Questions
Question 10. Define Buffer Pool?

Answer :

The buffer pool is a reserved primary storage, which is to satisfy the buffering necessities for one or greater table spaces or indexes. It may be made up of either 4K or 32K pages.

MySQL Tutorial
Question 11. Explain The Function Of Data Manager?

Answer :

The bodily database is managed with the aid of the DB2 element known as Data supervisor. It invokes different device components to perform logging, locking etc.

MySQL Interview Questions
Question 12. What Is A Storage Group (stogroup)?

Answer :

STOGROUP is a named series of DASD volumes, that is to be utilized by index areas and desk areas of the database.

PL/SQL Interview Questions
Question 13. Define Predicate?

Answer :

Predicate is an element of a seek condition. It expresses or implies a search situation.

DB2 Using SQL Tutorial
Question 14. Define Declaration Generator (dclgen)?

Answer :

Declaration Generator is a facility that is used to form SQL statements that describes a desk or view. At pre-bring together time, the table or view descriptions are then used to check the validity of SQL statements.

Question 15. List Out The Buffer Pools In Db2?

Answer :

There are 4 buffer swimming pools in DB2 and they're:

BP0
BP1
BP2
BP32
DB2 Using SQL Interview Questions
Question sixteen. Define Clustering Index?

Answer :

Clustering index is a sort of index, which locates the table rows and determines a way to organization the rows collectively inside the tablespace.

IBM Mainframe Tutorial
Question 17. What Is Concurrency?

Answer :

More than one DB2 utility method can get right of entry to the equal statistics on the identical time, is known as concurrency. However, troubles can take place along with, lost updates get right of entry to to unrepeatable reads and uncommitted facts.

IBM Mainframe Interview Questions
Question 18. Explain The Function Done By Data Manager?

Answer :

Data supervisor may be taken into consideration as a component this is able to coping with the databases which are bodily present and is able to invoking different additives related to the system for performing functionalities like logging, locking and in performing other I/O operations.

IBM DB2 Interview Questions
Question 19. Explain About Dbrm?

Answer :

DBRM stands for Database Request Module and is a component inner DB2, which is created by the pre compiler of DB2. This is a module that includes SQL supply statements that get extracted out of the application application. DBRMs form inputs which can be beneficial within the binding manner.

IMS/DB Tutorial
Question 20. Define Data Page?

Answer :

Data web page may be considered as a unit this is able to retrieving information from the database. The database from which the statistics can be retrieved is within the shape of 4 kilobytes or 32 kilobytes. The form in which records is retrieved depends on the way the desk is described inside the database. Data page also includes information regarding the catalog or user which are part of the database.

MYSQL DBA Interview Questions
Question 21. Explain About Rct?

Answer :

RCT is expanded as Resource – Control Table and is described in the DB2/CICS region. This is the component that contains of capabilities which might be amassed thru macros of DSNCRCT. RCT matches with the transaction ID that of CICS, with the authorization ID that of DB2. This need to additionally be matched with plan ID.

Question 22. How Can Tablespace Be Moved To Another Dasd Volume That Is Allocated For That Tablespace?

Answer :

Tablespace which you are using is allotted simplest to STOGROUP, then you may input the command ALTER STOGROUP for adding as well as deleting extent.

REORG TABLESPACE and RECOVER TABLESPACE are statements which can be useful in creating new STOGROUP that can factor toward the brand new volume.

ALTER tablespace and REORG and RECOVER are statements used for changing and recuperating the tablespace allotted inside the memory.

Question 23. What Is The Information Associated With Sysibm.Syslinks Table?

Answer :

This is the desk that contains information at the hyperlinks that exists between the tables created thru referential constraints.

IMS/DB Interview Questions
Question 24. Explain In Detail About Buffer Manager And Its Functionalities?

Answer :

Buffer supervisor can be considered as the element inner DB2 that enables in shifting information between virtual in addition to external medium. The buffer supervisor reduces the amount of bodily input in addition to output operations that are clearly done via using buffering strategies which are tremendously state-of-the-art.

Oracle Interview Questions
Question 25. Explain About Cursor Stability?

Answer :

Cursor stability is the belongings that tells the DB2 that the values of database which are read with the aid of utilizing this utility gets blanketed even as the records is used.

Question 26. Mention A Credible Reason Why Select* Is Never Given Preference In An Sql Program That Has Been Embedded?

Answer :

There are typically three motives why SELECT* is in no way given choice in an embedded SQL program. These are:–

In case if there's an alteration in the structure of the desk, then the program has to undergo a modification process.
All columns may be retrieved by using the program together with those columns , which may not be used.
In case if the consumer needs to scan the index, then to be able to no longer be viable.
Mainframe DB2 Interview Questions
Question 27. Explain Correlated Sub-queries?

Answer :

Correlated sub-queries are the ones queries in which the nester question on the internal aspect refers without delay lower back to outer question’s desk. For every and every row that is qualified, the evaluation of correlated sub-question is a should.

COBOL Interview Questions
Question 28. Comment Whether The Cursor Is Closed During Commit Or Not.?

Answer :

Yes. The cursor is closed during COMMIT.

Question 29. In An Sql Table That Is Embedded, What Is The Procedure To Retrieve Rows That Are Part Of A Db2 Table?

Answer :

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

Question 30. Mention The Way Of Highlighting As Well As Putting A Cursor To Use In A Cobol Program.?

Answer :

The nice manner of setting a CURSOR to apply in a COBOL application is to utilize DECLARE CURSOR, which can be used both in method division operation or in operating garage. This is being completed basically to focus on the SELECT assertion. Once DECLARE CURSOR is used, this is followed by way of OPEN, FETCH and in the end CLOSE.

Question 31. If The Cursor Is Kept Open Followed The Issuing Of Commit, What Is The Procedure To Leave The Cursor That Way?

Answer :

Inside DECLARE CURSOR, there's a WITH HOLD alternative, with a view to come beneficial in this situation. Although, one should observe the point that WITH HOLD characteristic has without a doubt no effect if considered for CICS pseudo-conventional programs.

Question 32. Explain Packages?

Answer :

PACKAGES are devices, which encompass executable codes which can be supposed for SQL statements for one respective DBRM.

Question 33. Highlight All The Advantages That Are Attached To A Package?

Answer :

Following are the advantages connected to a PACKAGE.

Avoid the fee of a huge collection of bind. It is lots more really helpful to head for a small series in place of a huge one.
Ensure which you do no longer need to deliver a huge series of members of DBRM collectively for a particular plan.
In case if you want to make adjustments in the software and these modifications finally cause mistakes, then you can decrease the fallback complexities with the help of PACKAGE.
During the procedure of computerized binding and rebinding of a particular plan, make sure that the whole transaction connected to the process is unavailable at some point of the path. 
MySQL Interview Questions
Question 34. For A Db2 Column That Is Being Defined As Decimal (eleven, 2), Discuss The Cobol Picture Clause?

Answer :

PIC S9 (9) V99 COMP – three
In the expression DECIMAL (11, 2)  2 occurs to be the precision while eleven is the facts kind size.

Question 35. Explain Dclgen?

Answer :

DCLGEN basically refers to DeCLarations GENerator whose primary cause is to generate copy books of the host language for the tables. It is likewise used to create the DECLARE desk.

Question 36. Mention Some Fields That Are A Part Of Sqlca?

Answer :

SQLERRM, SQLCODE, SQLERRD.

DB2 Using SQL Interview Questions
Question 37. Explain The Contents That Are A Part Of Dclgen?

Answer :

There are normally two components of DCLGEN. These are: 

A reproduction e book of the host language, so that you can deliver alternative definitions for all the column names.
In terms of the records-sorts of DB2, EXEC SQL DECLARE TABLE indicates a classy layout of the desk.
Question 38. Comment Whether Dclgen Is Mandatorily Used. If Not, Then What Is The Point Of Using It?

Answer :

It isn't exactly mandatory to carry DCLGEN into use. The primary use of DCLGEN comes at some stage in the pre-compilation segment where it facilitates in detecting the misspelt column names. Since DCLGEN is only a tool, it's going to most effective generate variable definitions for the host and reduces the probabilities of errors.

Question 39. In Case If At Some Point Of Time Db2 Is Down, Would That Impact The Pre-compilation Process Of A Db2-cobol Program?

Answer :

Even if DB2 is down sooner or later of time, even then it'll not effect the pre-compilation technique of DB2-COBOL application. The reason for the identical is that the pre-compiler never refers to the catalogue tables of DB2.

Question 40. Following A Db2 Update Statement, What Is The Quickest Way To Compute The Total Number Of Updated Rows?

Answer :

All you have to do is check the cost that has been saved in SQLERRD (three).

IBM Mainframe Interview Questions
Question 41. What Is Meant By Explain?

Answer :

EXPLAIN is essentially used to expose the direction of get right of entry to with the aid of the optimizer basically for an SQL declaration. Furthermore, EXPLAIN also can be introduced to apply in SPUFI or even in BIND step.

Question 42. Before You Give The Explain Statement, What Are The Prerogatives?

Answer :

Before giving the EXPLAIN statement, we need to make certain that PLAN_TABLE has already been created under AUTHID.

MYSQL DBA Interview Questions
Question 43. Mention The Location Where The Output Received From Explain Statement Is Stored?

Answer :

The output from EXPLAIN is stored in userid.PLAN_TABLE

Question forty four. Outputs Of Explain Are With Matchcols = 0. What Does This Signify?

Answer :

This indicates a non-matching scan of index furnished that ACCESSTYPE = I

Question 45. Mention The Various Locks That Are Available In Db2?

Answer :

EXCLUSIVE, SHARE and UPDATE

Question 46. What Is Release/acquire In Bind?

Answer :

There is a positive point in a software at which DB2 acquires or possibly releases the locks in opposition to tables as well as desk-spaces. These consist of intent locks.

Question forty seven. Mention The Different Locking Levels That Are Available In Db2?

Answer :

TABLE, PAGE and TABLESPACE

Question 48. Mention The Downsides Of Page Level Lock?

Answer :

In case if there are big updates to be executed, then the aid usage is high hence.




CFG