IBM DB2 Interview Questions & Answers part 2

0
375
Q: – Which of the following is NOT a valid method of authentication that can be used by DB2 9?

A. SERVER
B. SERVER_ENCRYPT
C. CLIENT
D. DCS

The correct answer is D. In DB2 9, the following authentication types are available: SERVER, SERVER_ENCRYPT, CLIENT, KERBEROS, KRB_SERVER_ENCRYPT,DATA_ENCRYPT, DATA_ENCRYPT_CMP, GSSPLUGIN, and GSS_SERVER_ENCRYPT. (Although DCS was a valid method of authentication in DB2 UDB Version 7.x, it is no longer supported.)

Q: – Explain "XML data type"?

The XML data type is used to store XML documents in their native format. The amount of storage space set aside to store an XML document varies and is determined in part, by the size and characteristics of the XML document being stored.

Q: – Explain "character large object (CLOB)"?

Execute the LIST DCS DIRECTORY command on the client and look for an entry for the MY_DB database.

Q: – Define "Indexes"?

An index is an object that contains an ordered set of pointers that refer to rows in a base table. Each index is based upon one or more columns in the base table.

Q: – While attempting to connect to a database stored on an iSeries server from a Windows client, the following message was displayed. SQL1013N the database alias name or database name "MY_DB" could not be found.  What is wrong there?

Execute the LIST DCS DIRECTORY command on the client and look for an entry for the MY_DB database.

Q: – Describe the use of "instanceof" keyword.

"instanceof" keyword is used to check what is the type of object.

Q: – Define "decimal data type"?

The decimal data type is used to store numeric values that contain both whole and fractional parts, separated by a decimal point. The terms DECIMAL, DEC, NUMERIC, and NUM are used to denote the decimal data type.

Q: – Which privilege is required to create a table?

CREATETAB privileges

Q: – In which of the following scenarios would a stored procedure be beneficial?

A. An application running on a remote client needs to be able to convert degrees Celsius to degrees Fahrenheit and vice versa
B. An application running on a remote client needs to collect three input values, perform a calculation using the values provided,and store the input data, along with the results of the calculation in two different base tables
C. An application running on a remote client needs to track every modification made to a table that contains sensitive data
D. An application running on a remote client needs to ensure that every new employee that joins the company is assigned a unique, sequential employee number

The correct answer is B. A scalar user-defined function would be the best option for the requirements outlined in answer A; an UPDATE trigger and a DELETE trigger that inserts records into an activity table every time update and delete operations are performed on a table containing sensitive data would be the best way to accomplish the requirements outlined in answer C; and an identity column or sequence could be used to address the requirements shown in answer D.

Submitted By:-Vikas            Email-ID: – vikas123.singh@yahoo.com

SHARE

LEAVE A REPLY