This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What Is Meant By Auto Commit? |
|
Answer» AUTO COMMIT is a SPUFI option that COMMITS the EFFECTS of SQL STATEMENTS automatically if they are SUCCESSFULLY executed. AUTO COMMIT is a SPUFI option that commits the effects of SQL statements automatically if they are successfully executed. |
|
| 2. |
What Is Meant By The Attachment Facility? |
|
Answer» The attachment FACILITY is an interface between DB2 and TSO, IMS/VS, CICS, or batch ADDRESS SPACES. It allows APPLICATION PROGRAMS to access DB2. The attachment facility is an interface between DB2 and TSO, IMS/VS, CICS, or batch address spaces. It allows application programs to access DB2. |
|
| 3. |
What Information Is Used As Input To The Bind Process? |
|
Answer» The DATABASE request module PRODUCED during the pre-compile. The SYSIBM.SYSSTMT table of the DB2 CATALOG. The database request module produced during the pre-compile. The SYSIBM.SYSSTMT table of the DB2 catalog. |
|
| 4. |
What Is A Db2 Bind? |
|
Answer» BIND is a process that builds “ACCESS PATHS” to DB2 tables. A bind uses the Database Request Modules(s) (DBRM(s)) from the DB2 pre-compile step as input and PRODUCES an application plan. It ALSO checks the user’s authority and validates the SQL statements in the DBRM(s). Bind is a process that builds “access paths” to DB2 tables. A bind uses the Database Request Modules(s) (DBRM(s)) from the DB2 pre-compile step as input and produces an application plan. It also checks the user’s authority and validates the SQL statements in the DBRM(s). |
|
| 5. |
Explain What A Plan Is? |
|
Answer» Plan is a DB2 OBJECT (produced during the bind PROCESS) that ASSOCIATES one or more database REQUEST MODULES with a plan name. Plan is a DB2 object (produced during the bind process) that associates one or more database request modules with a plan name. |
|
| 6. |
What Is An Alias? |
|
Answer» It is an alternate name that can be used in SQL STATEMENTS to REFER to a table or view in the same or REMOTE DB2 SUBSYSTEM. It is an alternate name that can be used in SQL statements to refer to a table or view in the same or remote DB2 subsystem. |
|
| 7. |
What Is An Access Path? |
|
Answer» The path that is USED to get to data SPECIFIED in SQL STATEMENTS. The path that is used to get to data specified in SQL statements. |
|
| 8. |
What Is Auditing? |
|
Answer» Recording SQL STATEMENTS that access a table . SPECIFIED at table CREATION TIME or through alter. Recording SQL statements that access a table . specified at table creation time or through alter. |
|
| 9. |
When Is The Authorization Check On Db2 Objects Done - At Bind Time Or Run Time? |
|
Answer» At run time. |
|
| 10. |
How Do I Create A Table Manager ( Emp#, Manager) Where Manager Is A Foreign Key Which References To Emp# In The Same Table? Give The Exact Ddl. |
|
Answer» First CREATE MANAGER table with EMP# as the primary KEY. Then ALTER it to DEFINE the FOREIGN key. First CREATE MANAGER table with EMP# as the primary key. Then ALTER it to define the foreign key. |
|
| 11. |
When Would You Prefer To Use Varchar? |
|
Answer» When a COLUMN which CONTAINS long text, e.g. remarks, notes, MAY have in most cases less than 50% of the maximum length. When a column which contains long text, e.g. remarks, notes, may have in most cases less than 50% of the maximum length. |
|
| 12. |
What Do You Mean By Not Null? When Will You Use It? |
|
Answer» The COLUMN cannot have NULLS. USE it for KEY FIELDS. The column cannot have nulls. Use it for key fields. |
|
| 13. |
What Do You Mean By Not Null With Default? When Will You Use It? |
|
Answer» This column cannot have nulls and while insertion, if no VALUE is supplied then it will have zeroes, spaces or date/TIME depending on WHETHER it is numeric, character or date/time. This column cannot have nulls and while insertion, if no value is supplied then it will have zeroes, spaces or date/time depending on whether it is numeric, character or date/time. |
|
| 14. |
What Is The Difference Between Synonym And Alias? |
|
Answer» SYNONYM: is dropped when the table or tablespace is dropped. Synonym is available only to the creator. SYNONYM: is dropped when the table or tablespace is dropped. Synonym is available only to the creator. |
|
| 15. |
What Is A Synonym ? |
|
Answer» Synonym is an ALTERNATE name for a table or view used mainly to hide the LEADING QUALIFIER of a table or view. A synonym is ACCESSIBLE only by the creator. Synonym is an alternate name for a table or view used mainly to hide the leading qualifier of a table or view. A synonym is accessible only by the creator. |
|
| 16. |
What Is Index Cardinality? |
|
Answer» The number of DISTINCT values a column or COLUMNS CONTAIN. The number of distinct values a column or columns contain. |
|
| 17. |
What Are Simple, Segmented And Partitioned Table Spaces ? |
|
Answer» Simple Tablespace:
Segmented Tablespace:
Partitioned Tablespace:
Simple Tablespace: Segmented Tablespace: Partitioned Tablespace: |
|
| 18. |
What Is Freepage And Pctfree In Tablespace Creation? |
|
Answer» PCTFREE: PERCENTAGE of each PAGE to be left free PCTFREE: percentage of each page to be left free |
|
| 19. |
What Is An Inner Join, And An Outer Join ? |
|
Answer» Inner Join: COMBINE information from two or more TABLES by comparing all values that meet the search CRITERIA in the designated column or columns of on e table with all the clause in corresponding columns of the other table or tables. These kinds of join which involve a match in both columns are called inner joins. Inner Join: combine information from two or more tables by comparing all values that meet the search criteria in the designated column or columns of on e table with all the clause in corresponding columns of the other table or tables. These kinds of join which involve a match in both columns are called inner joins. |
|
| 20. |
What Are The 4 Environments Which Can Access Db2 ? |
|
Answer» TSO, CICS, IMS and BATCH |
|
| 21. |
If I Have A View Which Is A Join Of Two Or More Tables, Can This View Be Updateable? |
|
Answer» No. No. |
|
| 22. |
Are Views Updateable? |
|
Answer» Not all of them. Some VIEWS are updateable e.g. single table view with all the fields or mandatory fields. EXAMPLES of non-updateable views are views which are joins, views that contain AGGREGATE FUNCTIONS(such as MIN), and views that have GROUP BY clause. Not all of them. Some views are updateable e.g. single table view with all the fields or mandatory fields. Examples of non-updateable views are views which are joins, views that contain aggregate functions(such as MIN), and views that have GROUP BY clause. |
|
| 23. |
What Does The Sqlcode Of -818 Pertain To? |
|
Answer» This is generated when the CONSISTENCY TOKENS in the DBRM and the load MODULE are DIFFERENT. This is generated when the consistency tokens in the DBRM and the load module are different. |
|
| 24. |
What Is Sqlcode -811? |
|
Answer» SELECT statement has RESULTED in RETRIEVAL of more than one ROW. SELECT statement has resulted in retrieval of more than one row. |
|
| 25. |
What Is Sqlcode -922 ? |
|
Answer» Authorization failure |
|
| 26. |
What Is The Difference Between Primary Key & Unique Index ? |
|
Answer» PRIMARY : a relational database constraint. Primary key consists of one or more COLUMNS that UNIQUELY IDENTIFY a row in the table. For a normalized relation, there is one designated primary key. Primary : a relational database constraint. Primary key consists of one or more columns that uniquely identify a row in the table. For a normalized relation, there is one designated primary key. |
|
| 27. |
How Many Clustering Indexes Can Be Defined For A Table? |
|
Answer» Only ONE. Only one. |
|
| 28. |
What Is A Clustering Index ? |
|
Answer» Causes the data rows to be stored in the ORDER specified in the index. A MANDATORY index defined on a PARTITIONED table space. Causes the data rows to be stored in the order specified in the index. A mandatory index defined on a partitioned table space. |
|
| 29. |
What Is Quiesce? |
|
Answer» A QUIESCE flushes all DB2 buffers on to the disk. This GIVES a correct SNAPSHOT of the database and should be used before and after any IMAGECOPY to MAINTAIN consistency. A QUIESCE flushes all DB2 buffers on to the disk. This gives a correct snapshot of the database and should be used before and after any IMAGECOPY to maintain consistency. |
|
| 30. |
What Is Check Pending ? |
|
Answer» When a table is Loaded with ENFORCE NO OPTION, then the table is LEFT in CHECK PENDING status. It means that the LOAD utility did not perform CONSTRAINT CHECKING. When a table is Loaded with ENFORCE NO option, then the table is left in CHECK PENDING status. It means that the LOAD utility did not perform constraint checking. |
|
| 31. |
What Is Copy Pending Status? |
|
Answer» A state in which, an IMAGE copy on a table needs to be TAKEN, In this STATUS, the table is available only for queries. You cannot UPDATE this table. To remove the COPY PENDING status, you take an image copy or USE REPAIR utility. A state in which, an image copy on a table needs to be taken, In this status, the table is available only for queries. You cannot update this table. To remove the COPY PENDING status, you take an image copy or use REPAIR utility. |
|
| 32. |
What Is Reorg? When Is It Used? |
|
Answer» REORG reorganizes data on physical STORAGE to reclutser rows, positioning overflowed rows in their proper SEQUENCE, to reclaim space, to restore free space. It is USED after heavy updates, INSERTS and deletes activity and after segments of a segmented tablespace have BECOME fragmented. REORG reorganizes data on physical storage to reclutser rows, positioning overflowed rows in their proper sequence, to reclaim space, to restore free space. It is used after heavy updates, inserts and deletes activity and after segments of a segmented tablespace have become fragmented. |
|
| 33. |
Give Some Example Of Statistics Collected During Runstats? |
|
Answer» # of rows in the table # of rows in the table |
|
| 34. |
When Will You Chose To Run Runstats? |
|
Answer» After a LOAD, or after mass updates, INSERTS, DELETES, or after REORG. After a load, or after mass updates, inserts, deletes, or after REORG. |
|
| 35. |
What Is Runstats? |
|
Answer» A DB2 UTILITY used to collect STATISTICS about the DATA values in tables which can be used by the optimizer to decide the access path. It ALSO collects statistics used for SPACE management. These statistics are stored in DB2 catalog tables. A DB2 utility used to collect statistics about the data values in tables which can be used by the optimizer to decide the access path. It also collects statistics used for space management. These statistics are stored in DB2 catalog tables. |
|
| 36. |
How Do You Insert A Record With A Nullable Column? |
|
Answer» To insert a NULL, move -1 to the null INDICATOR To insert a NULL, move -1 to the null indicator |
|
| 37. |
What Does It Mean If The Null Indicator Has -1, 0, -2? |
|
Answer» -1 : the FIELD is null -1 : the field is null |
|
| 39. |
How Do You Retrieve The Data From A Nullable Column? |
|
Answer» USE NULL INDICATORS. SYNTAX ... INTO :HOSTVAR:NULLIND Use null indicators. Syntax ... INTO :HOSTVAR:NULLIND |
|
| 40. |
How Does Db2 Store Null Physically? |
|
Answer» As an extra-byte PREFIX to the column VALUE PHYSICALLY, the null prefix is Hex ’00’ if the value is present and Hex ‘FF’ if it is not. As an extra-byte prefix to the column value Physically, the null prefix is Hex ’00’ if the value is present and Hex ‘FF’ if it is not. |
|
| 41. |
When Is The Access Path Determined For Dynamic Sql? |
|
Answer» At RUN TIME, when the PREPARE STATEMENT is ISSUED. At run time, when the PREPARE statement is issued. |
|
| 42. |
What Is Dynamic Sql? |
|
Answer» Dynamic SQL is a SQL STATEMENT created at program EXECUTION TIME. Dynamic SQL is a SQL statement created at program execution time. |
|
| 43. |
Lot Of Updates Have Been Done On A Table Due To Which Indexes Have Gone Haywire. What Do You Do? |
|
Answer» LOOKS like index page SPLIT has OCCURRED. DO a REORG of the indexes. Looks like index page split has occurred. DO a REORG of the indexes. |
|
| 44. |
How Would You Print The Output Of An Sql Statement From Spufi? |
|
Answer» Print the output dataset. |
|
| 45. |
What Are The 2 Sqlcodes That Are Returned? |
|
Answer» 100 ( for SUCCESSFUL completion of the query ), 0 (for successful COMMIT if AUTOCOMMIT is SET to Yes). 100 ( for successful completion of the query ), 0 (for successful COMMIT if AUTOCOMMIT is set to Yes). |
|
| 46. |
What Are The Advantages Of Using A Package? |
|
Answer» 1. Avoid having to bind a large number of DBRM members into a plan 1. Avoid having to bind a large number of DBRM members into a plan |
|
| 47. |
What Are Packages ? |
|
Answer» They CONTAIN executable code for SQL statements for ONE DBRM. They contain executable code for SQL statements for one DBRM. |
|
| 48. |
What Happens To The Plan If Index Used By It Is Dropped? |
|
Answer» PLAN is marked as INVALID. The next time the plan is accessed, it is REBOUND. Plan is marked as invalid. The next time the plan is accessed, it is rebound. |
|
| 49. |
What Else Is There In The Plan Apart From The Access Path? |
|
Answer» PLAN has the EXECUTABLE code for the SQL statements in the HOST program PLAN has the executable code for the SQL statements in the host program |
|
| 50. |
What Is Acquire/release In Bind? |
|
Answer» Determine the POINT at which DB2 acquires or releases locks against table and TABLESPACES, including INTENT locks. Determine the point at which DB2 acquires or releases locks against table and tablespaces, including intent locks. |
|