DB2 Standalone Utilities and Oracle SQL

Test your knowledge of IBM DB2 standalone utilities including DSN1SDMP, DSN1PRNT, DSN1LOGP, DSN1COPY, DSN1COMP, DSN1CHKR, DSNJU004, DSNJU003, and DSNJLOGF, plus Oracle SQL concepts including iSQL*Plus commands, date formatting, indexes, substitution variables, aliases, sequences, TRUNCATE, datetime types, and multi-table inserts.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which command lets you put data into more than one table using a single command?

  1. MERGE
  2. INSERT INTO MANY
  3. MULTIADD
  4. INSERT ALL INTO
Question 2 Multiple Choice (Multiple Answers)

Examine the SQL statement that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN ('CREDIT', 'CASH')), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id, order_date)); For which columns would an index be automatically created when you execute the above SQL statement?

  1. SER_NO
  2. ORDER_ID
  3. STATUS
  4. PROD_ID
  5. ORD_TOTAL
  6. composite index on ORDER_ID and ORDER_DATE
Question 3 Multiple Choice (Multiple Answers)

Which three are DATETIME data types that can be used when specifying column definitions? (Choose three.)

  1. TIMESTAMP
  2. INTERVAL MONTH TO DAY
  3. INTERVAL DAY TO SECOND
  4. INTERVAL YEAR TO MONTH
  5. TIMESTAMP WITH DATABASE TIMEZONE
Question 4 Multiple Choice (Multiple Answers)

Evaluate the SQL statement: TRUNCATE TABLE DEPT; Which three are true about the SQL statement? (Choose three.) A. It releases the storage space used by the table. B. It does not release the storage space used by the table. C. You can roll back the deletion of rows after the statement executes. D. You can NOT roll back the deletion of rows after the statement executes. E. An attempt to use DESCRIBE on the DEPT table after the TRUNCATE statement executes will display an error. F. You must be the owner of the table or have DELETE ANY TABLE system privileges to truncate the DEPT table.

  1. A
  2. B
  3. C
  4. D
  5. E
  6. F
Question 5 Multiple Choice (Multiple Answers)

Which two statements about sequences are true? (Choose two.) A. You use a NEXTVAL pseudo column to look at the next possible value that would be generated from a sequence, without actually retrieving the value. B. You use a CURRVAL pseudo column to look at the current value just generated from a sequence, without affecting the further values to be generated from the sequence. C. You use a NEXTVAL pseudo column to obtain the next possible value from a sequence by actually retrieving the value from the sequence. D. You use a CURRVAL pseudo column to generate a value from a sequence that would be used for a specified database column. E. If a sequence starting from a value 100 and incremented by 1 is used by more than one application, then all of these applications could have a value of 105 assigned to their column whose value is being generated by the sequence. F. You use a REUSE clause when creating a sequence to restart the sequence once it generates the maximum value defined for the sequence.

  1. A
  2. B
  3. C
  4. D
  5. E
  6. F
Question 6 Multiple Choice (Single Answer)

Which SQL statement generates the alias Annual Salary for the calculated column SALARY12? A. SELECT ename, salary12 'Annual Salary' FROM employees; B. SELECT ename, salary12 "Annual Salary" FROM employees; C. SELECT ename, salary12 AS Annual Salary FROM employees; D. SELECT ename, salary*12 AS INITCAP("ANNUAL SALARY") FROM employees

  1. A
  2. B
  3. C
  4. D
Question 7 Multiple Choice (Single Answer)

Which SQL statement accepts user input for the columns to be displayed, the table name, and the WHERE condition? A. SELECT &1, "&2" FROM &3 WHERE last_name = '&4'; B. SELECT &1, '&2' FROM &3 WHERE '&last_name = '&4''; C. SELECT &1, &2 FROM &3 WHERE last_name = '&4'; D. SELECT &1, '&2' FROM EMP WHERE last_name = '&4';

  1. A
  2. B
  3. C
  4. D
Question 8 Multiple Choice (Single Answer)

In which scenario would an index be most useful? A. The indexed column is declared as NOT NULL. B. The indexed columns are used in the FROM clause. C. The indexed columns are part of an expression. D. The indexed column contains a wide range of values.

  1. A
  2. B
  3. C
  4. D
Question 9 Multiple Choice (Single Answer)

Which SELECT statement should you use to extract the year from the system date and display it in the format "1998"? A. SELECT TO_CHAR(SYSDATE,'yyyy') FROM dual; B. SELECT TO_DATE(SYSDATE,'yyyy') FROM dual; C. SELECT DECODE(SUBSTR(SYSDATE, 8), 'YYYY') FROM dual; D. SELECT DECODE(SUBSTR(SYSDATE, 8), 'year') FROM dual; E. SELECT TO_CHAR(SUBSTR(SYSDATE, 8,2),'yyyy') FROM dual;

  1. A
  2. B
  3. C
  4. D
  5. E
Question 10 Multiple Choice (Single Answer)

Which are iSQL*Plus commands? A. INSERT B. UPDATE C. SELECT D. DESCRIBE E. DELETE F. RENAME

  1. A
  2. B
  3. C
  4. D
  5. E
  6. F
Question 11 Multiple Choice (Single Answer)

Which standalone utility is used to Preformat the Active Log

  1. DSNJU003
  2. DSNJLOGF
  3. DSN1LOGP
  4. DSN1SDMP
Question 12 Multiple Choice (Single Answer)

Which standalone utility is used to modify the BSDS(BootStrap DataSet)?

  1. DSNJLOGF
  2. DSN1CHKR
  3. DSNJU003
  4. DSNJ004
Question 13 Multiple Choice (Single Answer)

Which standalone utility can be used to list System and Utility timestamps, Contents of Quiesce history record, active Log datasets available etc.

  1. DSN1LOGP
  2. DSNJU003
  3. DSNJU004
  4. DSNJLOGF
Question 14 Multiple Choice (Single Answer)

Which standalone Utility verifies the Integrity of DB2 directory and Catalog

  1. DSN1SDMP
  2. DSN1LOGP
  3. DSN1COMP
  4. DSN1CHKR
Question 15 Multiple Choice (Single Answer)

Which Utility is used to estimate space savings to be achieved by DB2 Data compression in tablespaces?

  1. DSN1COMP
  2. DSN1CHKR
  3. DSN1COPY
  4. DSN1SDMP
Question 16 Multiple Choice (Single Answer)

Which standalone utility can be used to move data between subsystems by translating OBID, PSID and DBID?

  1. DSN1COMP
  2. DSN1PRNT
  3. DSN1SDMP
  4. DSN1COPY
Question 17 Multiple Choice (Single Answer)

Which standalone utility can be used to move data between subsystems by translating OBID, PSID and DBID?

  1. DSN1COMP
  2. DSN1PRNT
  3. DSN1SDMP
  4. DSN1COPY
Question 18 Multiple Choice (Single Answer)

Which standalone utility used to format the contents of the recovery log for display?

  1. DSNJLOGF
  2. DSN1LOGP
  3. DSN1PRNT
  4. DSN1SDMP
Question 19 Multiple Choice (Single Answer)

Which standalone utility can be used to identify the contents of a tablespace, index or Image copy datasets?

  1. DSN1PRNT
  2. DSN1SDMP
  3. DSN1LOGP
  4. DSN1COMP
Question 20 Multiple Choice (Single Answer)

Which standalone utility trace the events to occur and force a dump to a user defined dataset?

  1. DSN1PRNT
  2. DSN1COPY
  3. DSN1CHKR
  4. DSN1SDMP