DB2 Database Management
Quiz covering DB2 database concepts including table creation, constraints, locking mechanisms, error codes, SQL operations, and DB2-specific tools and features.
Questions
A declared temporary table is used for which of the following purposes?
- Backup purposes
- Storing intermediate results
- Staging area for load operations
- Sharing result data sets between applications
what is the maximum number of triggers can apply on a single table
- 4
- no limit
- 24
- 12
When you open a cursor, DB2 will always get all rows that meet the selection criteria and create a result set?
- Yes
- No
- It Depends
- None of the above
Which of the following causes a lock that is being held by an application using the Cursor Stability isolation level to be released?
- The cursor is moved to another row
- The row the cursor is on is deleted by the application
- The row the cursor is on is deleted by another application
- The row the cursor is on needs to be updated by another application
When the program name is not in the plan, we get
- -810
- -801
- -805
- -825
B37 abend during SPUFI is due to
- Space Issues
- Data Issues
- No records found while querying the table
- Both a & b
An application has acquired a Share lock on a row in a table and now wishes to update the row. Which of the following statements is true?
- The application must release the row-level Share lock it holds and acquire an Update lock on the row
- The application must release the row-level Share lock it holds and acquire an Update lock on the table
- The row-level Share lock will automatically be converted to a row-level Up-date lock
- The row-level Share lock will automatically be escalated to a table-level Up-date lock
Which of the following is used to indicate a column will not accept NULL values and can be referenced in another table's foreign key specification?
- Check constraint
- Default constraint
- Unique constraint
- Informational constraint
What authority is required to create a table?
- ADMIN Privileges
- CREATETAB Privileges
- No Privileges
- USERTAB Privileges
Given the following scenario: Table TABLE1 needs to hold specific numeric values up to 9999999.999 in column COL1. Once TABLE1 is populated, arithmetic operations will be performed on data stored in col-umn COL1. Which of the following would be the most appropriate DB2 data type to use for column COL1?
- INTEGER
- REAL
- NUMERIC (7,3)
- DECIMAL(10,3)
Which of the following tools can be used to automate table reorganization Operations ?
- Control Center
- Command Center
- Command Line Processor
- Task Center
How do you find the total number of rows in a table ?
- SELECT COUNT *
- SELECT COUNT(*)
- SELECT COUNT[*]
- SELECT COUNT(ALL)
Given the following statement: CREATE TABLE t1 col1 SMALLINT NOT NULL PRIMARY KEY, col2 VARCHAR(200) NOT NULL WITH DEFAULT NONE, col3 DECIMAL(5,2) CHECK (col3 >= 100.00), col4 DATE NOT NULL WITH DEFAULT) Which of the following definitions will cause the CREATE TABLE statement to fail?
- COL1
- COL2
- COL3
- COL4
When you open a cursor, DB2 will always get all rows that meet the selection criteria and create a result set?
- Yes
- No
- It Depends
- None of the above
Which of the following causes a lock that is being held by an application using the Cursor Stability isolation level to be released?
- The cursor is moved to another row
- The row the cursor is on is deleted by the application
- The row the cursor is on is deleted by another application
- The row the cursor is on needs to be updated by another application
When the program name is not in the plan, we get
- -810
- -801
- -805
- -825
B37 abend during SPUFI is due to
- Space Issues
- Data Issues
- No records found while querying the table
- Both a & b
An application has acquired a Share lock on a row in a table and now wishes to update the row. Which of the following statements is true?
- The application must release the row-level Share lock it holds and acquire an Update lock on the row
- The application must release the row-level Share lock it holds and acquire an Update lock on the table
- The row-level Share lock will automatically be converted to a row-level Up-date lock
- The row-level Share lock will automatically be escalated to a table-level Up-date lock
Which of the following is used to indicate a column will not accept NULL values and can be referenced in another table's foreign key specification?
- Check constraint
- Default constraint
- Unique constraint
- Informational constraint
What authority is required to create a table?
- ADMIN Privileges
- CREATETAB Privileges
- No Privileges
- USERTAB Privileges