GeekInterview.com
Series: Subject: Topic:

DB2 Interview Questions

Showing Questions 1 - 20 of 207 Questions
First | Prev | | Next | Last Page
Sort by: 
 | 

What is low values and high values?

Asked By: Interview Candidate | Asked On: Jun 26th, 2005

Answered by: Rishu on: Aug 12th, 2014

LOW-VALUE = X00 which are hexadecimal zeros.
HIGH-VALUE = XFF which are hexadecimal ones.

Answered by: sc60900 on: Oct 31st, 2008

High-Values & Low-Values are ALPHANUMERIC Figurative Constants in COBOL. These are non printable characters which are having highest and lowest values respectively in a collating sequence.

How do we know that null value has been selected for a nullable column

Asked By: radibioinfo | Asked On: Oct 4th, 2007

?A.Check if equal to nullb.Use null indicator, 0 indicates nullc.Use null indicator, -1 indicates nulld.Use null indicator, -2 indicates nulle.None of the above.Use null indicator, -1 indicates null

Answered by: Rishu on: Aug 12th, 2014

0:- Not Null
-1:- Null Value
-2:- Null value because of some conversion error

Answered by: sethy.pradeep on: Nov 19th, 2008

Hi,-1 indicates null indicator.Regards,pradeep

How many rows will the query return ?

Asked By: radibioinfo | Asked On: Oct 4th, 2007

Table1 has 6 rows and table2 has 6 select * from table1, table2; a.6b.12c.36d.720e.Cannot sayrows.36

Answered by: gurudas on: Aug 11th, 2014

Answer is 36 rows selected.

Answered by: Rishu on: Aug 7th, 2014

Lets say Table1 have 2 columns, 6 rows and Table2 have 3 columns, 6 rows.

Result table from SELECT * FROM TABLE1, TABLE2; will have 5 columns and 36 rows of data.

What do the initials DDL and dml stand for and what is their meaning?

Asked By: Interview Candidate | Asked On: Oct 13th, 2004

DDL is data definition language and dml is data manipulation language. DDL statements are create, alter, truncate. Dml statements are select, insert, delete and update.

Answered by: Rishu on: Aug 10th, 2014

DDL:- Create, Alter, Drop etc...
DML:- Select, Insert, Update, Delete, Declare, Open, Fetch, Close etc...

Answered by: Srinivas17738 on: Aug 17th, 2010

DDL - Data Definition Language - Used to create/alter/delete Database objects DML- Data Manipulation Language - Used to insert/delete/update/select the data in the database obects(table/views...)

Db2 indexes

Asked By: radibioinfo | Asked On: Oct 4th, 2007

I ) unique index can be created only on primary key. Ii) query will execute faster if predicates are applied on indexed column. 1 both are true2 i) is only true3 ii) is only true4 neither is true

Answered by: Rishu on: Aug 9th, 2014

3 ii) is Only True

Answered by: Prachi Patankar on: Jun 22nd, 2014

Both are true

How to convert non-db2 files into db2 format for ex . Data in excel, ms-acces, Oracle etc.

Asked By: latha | Asked On: Aug 22nd, 2007

Answered by: Rishu on: Aug 7th, 2014

Guys, he is not asking how to FTP files to mainframe. He wants to know, how to convert excel file(tabular format) to DB2 table format.

Answered by: Anoop Nair on: Feb 26th, 2014

You can convert non mainframe files like excel to mainframe raw files using FTP. Inside FTP tool, choose the option LAN to Mainframe and then process the request.

Db2 control structure

Asked By: radibioinfo | Asked On: Oct 4th, 2007

A control structure used by db2 to communicate with the application program isa.Address spaceb.Authidc.Threadd.Viewe.String thread

Answered by: Lalit Pant on: Jul 10th, 2014

The answer is thread. The thread is used by the DB2 to pass the results of the query to the application program.
SQLCA is the set of variables that are used by DB2 to pass the status and error messages of the query execution to the program and are used in error routines and paragraphs.

Answered by: prachi patankar on: Jun 22nd, 2014

SQLCA

Db2 cursor stablity

Asked By: radibioinfo | Asked On: Oct 4th, 2007

I) cursor stablity leads to higher concurency ii) repeatable read leads to higher consistency1 both are true2 i) is only true3 ii) is only true4 neither is trueboth are true

Answered by: Gurumoorthy K on: Jul 3rd, 2014

4. Neither is true.

Cursor Stability Leads to Higher Consistency which means the data is very much reliable.
Repeatable Read Leads to Higher concurrency, means data availability as there is no lock over the table.

Guru

Answered by: yuvaevergreen on: Mar 26th, 2010

Decreasing preference for concurrency: (CS)(RS)(RR)(UR)Decreasing preference for consistency: (UR)(RR)(RS)(CS)

Can we use sum function on alphanumeric column ?

Asked By: praveen_s | Asked On: Apr 18th, 2012

Answered by: Gurumoorthy K on: Jul 3rd, 2014

No, you cant use SUM on char columns. But few other functions can be used like MAX, MIN etc.

Answered by: daniel.epps on: Apr 19th, 2012

Yes

Db2 cursor declaration

Asked By: radibioinfo | Asked On: Oct 4th, 2007

The cursor can be declared in working storage sectionlinkage sectioninput-output section. working storage section

Answered by: PRACHI PATANKAR on: Jun 22nd, 2014

Working storage section

Answered by: Mandar Dindorkar on: Jul 27th, 2012

Cursor Declaration can be done either in WORKING STORAGE SECTION in DATA DIVISION or in PROCEDURE DIVISION, the only rule is that it has to be coded before the OPEN CURSOR statement in the Procedure Division.

How do you display last 5 records in db2?

Asked By: chhavis928 | Asked On: Aug 25th, 2011

Answered by: madhavan on: Mar 10th, 2014

SELECT * FROM Table_Name order by column_name desc Fetch first 5 rows only;

Answered by: Mohit on: May 28th, 2012

There is nothing called "fetch last n records only" in db2...

You can use select col1 from table1 order by col1 desc fetch first 5 records only

Db2 table change - how impact analysis can be done?

Asked By: clrMFint | Asked On: Feb 20th, 2014

If any db2 column changed,how impact analysis can be done fo this?

What will happened ,if the subprogram is called second time?

Asked By: Interview Candidate | Asked On: Jun 6th, 2005

Answered by: Mahaveer on: Feb 2nd, 2014

Code Program-idIS INITIAL PROGRAM
If IS INITIAL is coded along with program id of of sub program then the program will be in intial stage every time it is called
OR CANCEL is issued after CALL will set the sub program to initial state

Answered by: GZ on: Apr 2nd, 2006

variables might already be in initiated state due to first run.

What is the difference between package and plan?

Asked By: priya | Asked On: Jun 21st, 2007

Answered by: Mandar Dindorkar on: Jul 27th, 2012

the difference is that a Package is at a more granular level. If a module is bound to a Package, any change in module requires only the Package to be re-bound, without the necessity to re-bind the ent...

Answered by: sam117 on: Dec 25th, 2009

Package can be bound for single DBRM only. Plan can contain both DBRM and Packages. Packaqes can't be executed until they are bound into a plan. 

How do you improve db2 SQL performance?

Asked By: Anilsodadasi | Asked On: Apr 25th, 2007

Answered by: Mandar Dindorkar on: Jul 27th, 2012

A

Answered by: kalone on: Feb 1st, 2010

To improve the performance following are some of the tips :1. Always use FOR UPDATE OF when updating with a cursor.2. Use WHERE CURRENT OF to delete a single row.3. Check the SQLCODE after each SQL statemnt.4. Avoid using WHENEVER.

Difference between embedded SQL and dynamic SQL?

Asked By: krishna | Asked On: Jun 24th, 2006

Answered by: Mandar Dindorkar on: Jul 27th, 2012

Embedded SQL -> Access Path is generated during BIND time. also table authorizations are checked during BIND (if VALIDATE(BIND) is used).

Dynamic SQL => Access path is generated during Run-time. Table authorizations can only be checked during run-time.

Answered by: kalone on: Feb 1st, 2010

STATIC sql(embedded) : It is hardcoded in the program itself and the changeable                   &n...

If SQL return -805 , what will user want to do

Asked By: sprabodhini | Asked On: May 7th, 2008

Answered by: Mandar Dindorkar on: Jul 27th, 2012

-805 will never occur if a DBRM is directly bound to a PLAN. -805 occurs when 1) Source Program is changed and per-compiled and new LOAD Module created as a result of change is used at Run time, but ...

Answered by: jzmoonrock56 on: Aug 31st, 2011

Rebind the plan.

What is a db2 access path?

Asked By: Interview Candidate | Asked On: Oct 13th, 2004

An access path is the method used to access data specified in db2 SQL statements.

Answered by: Mandar Dindorkar on: Jul 27th, 2012

DB2 Access path is (in most cases) the path which results in the most optimized execution of an SQL query. Whenever any Static SQL (Embedded SQL) is bound to a package/plan, the DB2 optimizer creates...

Answered by: jzmoonrock56 on: Aug 31st, 2011

The access path is determined by DB2 during the bind process. This determines what indexes will be used.

What is check pending and copy pending status in db2, how do you resolve it?

Asked By: Shivanand madhabavi | Asked On: Sep 14th, 2006

Answered by: Mandar Dindorkar on: Jul 27th, 2012

Check Pending is when you have data added to the table using either insert or LOAD utility which violate table check constraints. The IBM DB2 LOAD UTILITY has ENFORCE CONSTRAINTS and similar options w...

Answered by: Mohit on: May 28th, 2012

SET INTEGRITY Option....please read IBM libraries before using this.

Bind parameters

Asked By: bhima123 | Asked On: Oct 28th, 2010

What are the important bind parameters to be used in bind card? What is the significance of each parameter?

Answered by: Mandar Dindorkar on: Jul 27th, 2012

I will say the Answer Depends barring a few parameters which are mostly used. 1) ISOLATION -> Isolation Level to decide level of locking used along with LOCK parameters on the DB2 objects. 2) ACQUI...

Answered by: jzmoonrock56 on: Aug 31st, 2011

The bind parameters are generally generic the most important is isolation level which is always CS and sometimes UR if you want to rock right thru.

First | Prev | | Next | Last Page

 

 

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.