Oracle Database Administration and SQL

Test your knowledge of Oracle database administration, SQL queries, performance tuning, and database management concepts including transactions, indexes, functions, control files, and redo logs.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Archived Redo Log is

  1. It consists of Redo Log files that have archived before being reused.
  2. It consists of Redo Log files that have archived after being reused.
  3. It consists of Redo Log files that is archiving when currently being reused.
  4. It consists of Redo Log files that have archived not being reused.
Question 2 Multiple Choice (Single Answer)

Examine the syntax for creating a DEPARTMENT table: CREATE TABLE ABCD( A NUMBER(4), B VARCNAR2(30), C NUMBER(6), D NUMBER(4)) STORAGE(INITIAL 200K NEXT 200K PCTINCREASE 50 MINEXTENTS 1 MAXEXTENTS 5) TABLESPACE userdata; What is the size defined for the fifth extent?

  1. 500K
  2. 300K
  3. 675K
  4. 275K
Question 3 Multiple Choice (Single Answer)

The control file defines the current state of the physical database. Which dynamic performance views obtain information from the control file?

  1. V$LOG
  2. V$THREAD
  3. V$DATAFILE
  4. All of the above
Question 4 Multiple Choice (Single Answer)

Control file contains information about

  1. database
  2. redo logfile & datafile
  3. archivelog file location
  4. All of the above
Question 5 Multiple Choice (Single Answer)

What is a Parallel Server

  1. Multiple instances accessing the same database (Only In Multi-CPU environments)
  2. Multiple instances accessing the same database (Only In single-CPU environments)
  3. Multiple instances accessing the different database (Only In single-CPU environments)
  4. Single instance accessing the multiple database (Only In Multi-CPU environments)
Question 6 Multiple Choice (Single Answer)

To re-create a database, all existing database files should be reused. The following SQL statement is issued: CREATE DATABASE ABC DATAFILE '/u01/oradata/abc/system0l.dbf' SIZE 100M REUSE LOGFILE GROUP 1 ('/u01/oradata/abc/logla.rdo', '/u02/oradata/abc/loglb.rdo') SIZE 50K REUSE, GROUP 2 ('/u01/oradata/abc/log2a.rdo', '/u02/oradata/abc/log2b.rdo') SIZE 50K REUSE MAXLOGFILES 5 MAXLOGHISTORY 100 MAXDATAFILES 10; Why does the CREATE DATABASE statement fail?

  1. The MAXLOGFILES are set too low
  2. The CONTROLFILE REUSE clause is omitted
  3. The online redo log files cannot be reused
  4. The data file belonging to the SYSTEM tablespace cannot be reused
Question 7 Multiple Choice (Single Answer)

What represents the value of the ORACLE_HOME environment variable in Oracle 9i?

  1. @
  2. !
  3. ^
  4. &
Question 8 Multiple Choice (Single Answer)

Which of the following tasks can be performed by using the TO_CHAR function?

  1. Convert '10'to 10
  2. Convert 'TEN' to 10
  3. Convert 10 to '10'
  4. Convert a character expression to a date
Question 9 Multiple Choice (Single Answer)

Evaluate the following SQL statement: SELECT ROUND (TRUNC (MOD (1600, 10),-1), 2) FROM dual; What will be displayed?

  1. 100
  2. 0
  3. 1
  4. 10
Question 10 Multiple Choice (Single Answer)

What is the effect of setting the value "ALL_ROWS" for OPTIMIZER_GOAL parameter of the ALTER SESSION command ?

  1. This value causes the optimizer to the rule-based approach for all SQL statements in the session regardless of the presence of statistics and to optimize with a goal of best throughput
  2. This value causes the optimizer to the rule-based approach for all SQL statements in the session in regard of the presence of statistics and to optimize with a goal of best throughput
  3. This value causes the optimizer to the cost-based approach for all SQL statements in the session regardless of the presence of statistics and to optimize with a goal of best throughput
  4. This value causes the optimizer to the cost-based approach for all SQL statements in the session regard of the presence of statistics and to optimize with a goal of best throughput
Question 11 Multiple Choice (Single Answer)

What is the correct use of the Trunc command on a date?

  1. SELECT TRUNC(TO_DATE('12-Feb-99','DD-MON-YY'), 'YEAR') "Date " FROM DUAL;
  2. SELECT TRUNC(TO_DATE('12-Feb-99','DD-MON-YY'), 'YEAR') FROM DUAL;
  3. TRUNCATE=To_Date('09-Jan-02,DD-MON-YY,'YEAR',"Date" from Dual;
  4. Date =TRUNCATE(To_DATE('09-Jan-02','DD-MON-YY'),'YEAR'),'YEAR)"DATE: from DUAL;
Question 12 Multiple Choice (Single Answer)

How do I eliminate duplicate rows in an Oracle database?

  1. DELETE FROM table_name WHERE ROWID IN (SELECT MAX (ROWID) FROM table_name GROUP BY duplicate_values_field_name);
  2. DELETE FROM table_name WHERE ROWID NOT IN (SELECT MAX (ROWID) FROM table_name GROUP BY duplicate_values_field_name);
  3. DELETE FROM table_name WHERE ROWID IN (SELECT MIN (ROWID) FROM table_name GROUP BY duplicate_values_field_name);
  4. DELETE FROM table_name WHERE ROWID IN (SELECT AVG (ROWID) FROM table_name GROUP BY duplicate_values_field_name);
Question 13 Multiple Choice (Single Answer)

Which Oracle access method is the fastest way for Oracle to retrieve a single row?

  1. Primary key access
  2. Access via unique index
  3. Table access by ROWID
  4. Full table scan
Question 14 Multiple Choice (Single Answer)

Which command will delete all data from a table and will not write to the rollback segment?

  1. DROP
  2. DELETE
  3. CASCADE
  4. TRUNCATE
Question 15 Multiple Choice (Single Answer)

Which character function can be used to return a specified portion of a character string?

  1. INSTR
  2. SUBSTRING
  3. SUBSTR
  4. POS
Question 16 Multiple Choice (Single Answer)

Which of the following SQL functions can operate on any datatype?

  1. TO_CHAR
  2. LOWER
  3. LPAD
  4. MAX
  5. CEIL
Question 17 Multiple Choice (Single Answer)

Which of the following is an important consideration when tuning an SQL statement?

  1. The number of CPUs on the server
  2. The degree of parallelism on the tables
  3. The use of bitmap indexes
  4. The quality of the SQL optimization
Question 18 Multiple Choice (Single Answer)

What best describes the relationship between indexes and SQL performance?

  1. Indexes are only used in special cases
  2. Indexes are used to make table storage more efficient
  3. Indexes rarely make a difference in SQL performance
  4. Indexes exist solely to improve query speed
Question 19 Multiple Choice (Single Answer)

Which of the following SQL clauses is used to select data from 2 or more tables?

  1. HAVING
  2. JOIN
  3. WHERE
  4. BETWEEN
Question 20 Multiple Choice (Single Answer)

Which of the following commands cause a transaction to end?

  1. DELETE
  2. ALTER
  3. INSERT
  4. UPDATE
  5. ROLLBACK