Database Management Fundamentals: DB2 and Oracle

A comprehensive quiz covering essential database management concepts in DB2 and Oracle, including utilities, components, optimizer, packages, roles, privileges, tablespaces, and SQL operations.

20 Questions Published

Questions

Question 1 True/False

SELECT department, COUNT(1) FROM employees WHERE salary > 25000 GROUP BY department; What about this query :-) ?

  1. True
  2. False
Question 2 Multiple Choice (Single Answer)

where would you find automatic_ipc parameter ?

  1. listener.ora
  2. sqlnet.ora server file
  3. sqlnet.ora client file
  4. tnsnames.ora server file
Question 3 Multiple Choice (Single Answer)

Which of the following statements creates an Oracle account, but lets the operating system authenticate logons?

  1. create user ops$admin identified by os;
  2. create user ops$admin identified externally;
  3. create user ops$admin nopassword;
  4. create user ops$admin authenticated by os;
Question 4 Multiple Choice (Single Answer)

Which of the following types of statements can use a temporary tablespace?

  1. An index creation
  2. SQL statements with a GROUP BY clause
  3. A hash join operation
  4. All of the above
Question 5 Multiple Choice (Single Answer)

Which of the following statements gives user desmond the ability to alter table gl.accounts?

  1. grant alter on gl.accounts to desmond;
  2. grant alter to desmond on gl.accounts;
  3. grant alter table to desmond;
  4. allow desmond to alter table gl.accounts;
Question 6 Multiple Choice (Single Answer)

Which of the following statements gives user desmond the ability to alter table gl.accounts as well as give this ability to other accounts?

  1. grant alter any table with grant option to desmond;
  2. grant alter on gl.accounts to desmond with admin option;
  3. grant alter any table to desmond with grant option;
  4. grant alter any table to desmond with admin option;
Question 7 Multiple Choice (Multiple Answers)

The following SQL statement will allow user regina to perform which operations on sequence oe.orders_seq? GRANT ALL ON oe.orders_seq TO regina;

  1. Select the next value from oe.orders_seq.
  2. Alter sequence oe.orders_seq to change the next value.
  3. Change the number of sequence numbers that will be cached in memory.
  4. Both A and C.
  5. All of the above.
Question 8 Multiple Choice (Single Answer)

User system granted SELECT on sh.products to user A using WITH GRANT OPTION. A then granted SELECT on sh.products to user B. A has left the company, and his account is dropped. What happens to B’s privileges on sh.products?

  1. B loses his SELECT privilege on sh.products.
  2. B retains his SELECT privilege on sh.products.
  3. B loses his SELECT privilege if A was dropped with the CASCADE REVOKE option.
  4. B retains his SELECT privilege if A was dropped with the NOCASCADE REVOKE option
Question 9 Multiple Choice (Single Answer)

User system granted SELECT ANY TABLE to user A using WITH ADMIN OPTION. A then granted SELECT ANY TABLE to user B. Ian A left the company, and his account is dropped. What happens to B's privileges?

  1. B loses his privileges.
  2. B retains his privileges.
  3. B loses his privileges if A was dropped with the CASCADE REVOKE option.
  4. B retains his privileges if A was dropped with the NOCASCADE REVOKE option.
Question 10 Multiple Choice (Single Answer)

Which of the following system privileges can allow the grantee to masquerade as another user and therefore should be granted judiciously?

  1. CREATE ANY JOB
  2. ALTER USER
  3. CREATE ANY PROCEDURE
  4. All of the above
Question 11 Multiple Choice (Single Answer)

Which of the following statements enables the role user_admin in the current session?

  1. alter session enable role user_admin;
  2. alter session set role user_admin;
  3. alter role user_admin enable;
  4. set role user_admin;
Question 12 Multiple Choice (Single Answer)

Which of the following SQL statements allows user augustin to use the privileges associated with the password-protected role info_czar, which has been granted to him?

  1. set role all;
  2. alter user augustin default role all;
  3. alter session enable role info_czar;
  4. alter session enable info_czar identified by brozo
Question 13 Multiple Choice (Multiple Answers)

Which things should be considered while deciding the size of undo tablespace in your database ( choose three)

  1. The size of an undo block
  2. The size of the redo log files.
  3. The size of the database buffer cache.
  4. The value of the UNDO_RETENTION parameter.
  5. Undo blocks generated per second.
Question 14 Multiple Choice (Single Answer)

You suspect unauthorized data manipulation language (DML) operations on a particular table. You want to track users who performing the transactions and the values used in the transactions. Also you plan to transfer these values to another table for analysis. How would you achieve this?

  1. By auditing the all DML operations on table.
  2. By using external table.
  3. By using triggers.
  4. By using anonymous PL/SQL blocks
Question 15 Multiple Choice (Single Answer)

Which of the following is invalid db2 component :

  1. System Services
  2. Locking Services
  3. SQL Services
  4. Distributed DATA Facilities
Question 16 Multiple Choice (Single Answer)

Package is a

  1. Compiled form of application plan
  2. Compiled form of Database Requests
  3. Collection of Sql statements
  4. Collection of Application plansCollection of Application plans
Question 17 Multiple Choice (Single Answer)

Responsibility of OPTIMIZER is :

  1. Compiles the SQL statements
  2. Complies the list of packages into application plan
  3. Stored the application plan and packages into Directory
  4. Chooses the best access path from catalog tables
Question 18 True/False

If an object is dropped , all Application plans that were using the object are marked by DB2 as invalid ( True or False)

  1. True
  2. False
Question 19 True/False

If a new object is created , DB2 automatically starts using it (True or False)

  1. True
  2. False
Question 20 Multiple Choice (Single Answer)

Which utility is used to retrieve data from a Image copy

  1. LOAD
  2. UNLOAD
  3. REORG
  4. RUNSTATS