InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
How many clustering index we can have for a single table? |
|
Answer» We can have only one clustering index for a table. |
|
| 2. |
Suppose a table A has an Alias named AL1. Which of the query is correct to drop the AL1 alias? |
|
Answer» DROP ALIAS AL1 is the query to drop a alias. |
|
| 3. |
Which index must be present for partitioned table space? |
|
Answer» A partitioned table space must have a clustered index. |
|
| 4. |
In which format index in stored? |
|
Answer» An indexed is stored in B-tree format. |
|
| 5. |
What does SPUFI stands for? |
|
Answer» SPUFI stands for SQL Processor Using File Input. |
|
| 6. |
What is the maximum size of a VARCHAR data type in DB2? |
|
Answer» Varchar data type maximum size is of 4046 bytes. |
|
| 7. |
What is the maximum size of a CHAR data type in DB2? |
|
Answer» Char data type maximum size is of 254 bytes. |
|
| 8. |
Write the query to delete all the rows from a table. |
|
Answer» DELETE * FROM table-name is the syntax to delete all the rows from a table. |
|
| 9. |
Write a query to delete a table from database. |
|
Answer» DROP TABLE table-name is the syntax to delete a table from database. |
|
| 10. |
How many primary keys can be declared on a table? |
|
Answer» A table can have only one primary key. |
|
| 11. |
In which statement you can define primary key? |
|
Answer» Primary keys are optional and we can define them in CRETAE TABLE & ALTER TABLE statements. |
|
| 12. |
Which statement is used to authorize access on database tables? |
|
Answer» GRANT keyword is used to grant privileges on DB2 tables. |
|
| 13. |
Which statement is used to revoke the access from a database? |
|
Answer» REVOKE statement is used to take away the permissions from a Database. |
|
| 14. |
What does a positive SQL code indicates? |
|
Answer» A negative SQL code indicates a failure while a positive one indicates an exception. |
|
| 15. |
What happens in BIND step in a DB2 program? |
|
Answer» Bind step converts all the SQL statements into executable form in COBOL-DB2 program. |
|
| 16. |
Suppose a Plan contains 4 Packages & we modified one of the DBRM which is present in one of the Package. Then for normal functionality of application what should we do? |
|
Answer» We will bind only that package which contains the modified DBRM. No need to bind all the packages. |
|
| 17. |
What does application plan contains? |
|
Answer» Application plan consists of one or more DBRM & application package which is kept in buffer pool during program execution. |
|
| 18. |
When you will face SQLCODE -803? |
|
Answer» When you will try to insert or update a record with duplicate key then you will face SQLCODE = -803. |
|
| 19. |
When you will face SQLCODE -911? |
|
Answer» At the time of deadlock or timeout you will face SQLCODE -911. |
|
| 20. |
When you will face SQLCODE -922? |
|
Answer» If a user is not authorized to access DB2 objects, he will face SQLCODE -922. |
|
| 21. |
When you will face SQLCODE -818? |
|
Answer» SQLCODE -818 is a timestamp mismatch of load module and bind timestamp built from DBRM. |
|
| 22. |
In a COBOL-DB2 program where can we declare a cursor? |
|
Answer» We can declare a cursor either i Working Storage Section or in Procedure Division also. |
|
| 23. |
Suppose we added a new column by using ALTER statement, where the column will be added? |
|
Answer» When we use ALTER statement for adding a new column then it will be added at the end of the table. |
|
| 24. |
How you will count the number of rows from a table TAB? |
|
Answer» SELECT COUNT(*) FROM TAB query is used to count the number of rows in a table. |
|
| 25. |
What is the input to the bind process? |
|
Answer» DBRM is the input to the bind process which is produced in the pre-compile step. |
|
| 26. |
If a transaction has an exclusive lock on some data, then what are the other types of lock which can be applied on it? |
|
Answer» A transaction gets an Exclusive lock when it is about to write at that time no other lock can be applied on it. |
|
| 27. |
Which isolation level ensures highest data integrity? |
|
Answer» Repeatable Read ensures highest data integrity as it holds page and lock the rows until a COMMIT point. |
|
| 28. |
Which isolation level provides maximum concurrency? |
|
Answer» Uncommitted read provides maximum concurrency. |
|
| 29. |
Which command is used to commit a transaction in CICS program? |
|
Answer» SYNCPOINT command is used to commit a transaction in CICS program. |
|
| 30. |
Which utility provides statistical information such as the number of pages and rows and stores them in Catalog tables? |
|
Answer» Runstats utility updated the catalog tables with the statistical information. |
|
| 31. |
Which utility reclaims space from pages when some rows were deleted? |
|
Answer» Reorg utility is used for reorganization of data on physical storage. |
|
| 32. |
Which utility is used to load data into a table from a sequential file? |
|
Answer» Load utility is used to load data into tables. |
|
| 33. |
How the locks can be classified? |
|
Answer» Locks can be classified based on size, duration and mode. |
|
| 34. |
If a transaction takes a Shared lock on some data, then other transactions can get what type of lock? |
|
Answer» If a transaction takes a Shared lock on some data, then other transactions can get either a Shared or Update lock on it. |
|
| 35. |
If a transaction takes a Update lock on some data, then other transactions can get what type of lock? |
|
Answer» If a transaction takes an Update lock on some data, then other transactions can only get only Shared lock on it. |
|
| 36. |
What action DB2 takes when a program abends? |
|
Answer» When a program abends in middle of some transaction then DB2 performs a auto rollback. |
|
| 37. |
When a table is dropped all the alias get dropped automatically. State whether true or false? |
|
Answer» This statement is incorrect. Synonyms get dropped automatically when we drop the table but alias of the table remains there. We need to manually drop the alias. |
|
| 38. |
Host variables cannot be group items but they may be grouped together in host structure. They can be Renamed or Redefined. State whether true or false? |
|
Answer» This statement is incorrect as host variables cannot be renamed & redefined. |
|
| 39. |
Cursors are used to handle single row selections at a time. They are data structure which hold all the results of a query. State whether true or false? |
|
Answer» This statement is incorrect as cursors are used to handle multiple row selections at a time. |
|
| 40. |
In a COBOL-DB2 program all SQL statements must be coded in Area A. State whether true or false? |
|
Answer» This statement is incorrect as SQL statements must be coded in Area B. |
|
| 41. |
Which component is used to processes SQL statements and selects the access paths? |
|
Answer» DB2 optimizer is used to select the access paths & to process the SQL queries. |
|
| 42. |
What is the physical storage length of DATE data type? |
|
Answer» DATE data types take 4 bytes and default is 'YYYY-MM-DD' |
|
| 43. |
What is the physical storage length of TIMESTAMP data type? |
|
Answer» TIMESTAMP data type takes 10 bytes and default is YYYY-MM-DD:HH:MM:SS-NNNNNN |
|
| 44. |
Which field in SQLCA shows the number of updated rows after update statement? |
|
Answer» Check the value of SQLERRD to know how many rows got updated after an update statement. |
|
| 45. |
In which step we specify the isolation level? |
|
Answer» In Bind step we specify the isolation level. |
|
| 46. |
On which level we can apply the locks? |
|
Answer» Locking can be applied on either of these − Page, table and table space. |
|
| 47. |
Which component handles DB2 startup and shutdown? |
|
Answer» System services component handles DB2 startup and shutdown. |
|
| 48. |
Which component is responsible for execution of SQL statements? |
|
Answer» Database services component is responsible for execution of SQL statements and it manages buffer pool also. |
|
| 49. |
Which component checks DB2 deadlocks? |
|
Answer» Locking services are provided by Locking services component which is known as Internal Resource Lock Manager (IRLM) and manages concurrency issues and dead locks. |
|
| 50. |
What is the picture clause of Null Indicator variable? |
|
Answer» S9(4) COMP is the picture clause of a null indicator. |
|