SQL and Oracle Database Administration

Covers SQL operations including set operations, DML statements, functions, and Oracle database administration topics such as data dictionary views, redo logs, control files, archivelog mode, and recovery mechanisms

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which SELECT statement will the result 'ello world' from the string 'Hello World'?

  1. SELECT SUBSTR ('Hello',) FROM dual;
  2. SELECT INITCAP (TRIM ('Hello World',1,1) FROM dual;
  3. SELECT LOWER (SUBSTR ('Hello World',1,1) FROM dual
  4. SELECT LOWER (SUBSTR ('Hello World',2,1) FROM dual;
  5. SELECT LOWER (TRIM ('H' FROM 'Hello World')) FROM dual;
Question 2 Multiple Choice (Multiple Answers)

SELECT* FROM order; You use this statement to retrieve data from a data table for __________.

  1. Updating
  2. Viewing
  3. Deleting
  4. Inserting
  5. Truncating
Question 3 Multiple Choice (Multiple Answers)

Which four statements correctly describe functions that are available in SQL? (Choose four)

  1. INSTR returns the numeric position of a named character.
  2. NVL2 returns the first non-null expression in the expression list.
  3. DECODE translates an expression after comparing it to each search value
  4. TRIM trims the heading of trailing characters (or both) from a character string
  5. NVL compares two expressions and returns null if they are equal, or the first expression of they are not equal
  6. NULLIF compares twp expressions and returns null if they are equal, or the first expression if they are not equal
Question 4 Multiple Choice (Multiple Answers)

Which two tasks can your perform by using the TO_CHAR function? (Choose two)

  1. Convert 10 to 'TEN'
  2. Convert '10' to 10
  3. Convert '10' to '10'
  4. Convert 'TEN' to 10
  5. Convert a date to a character expression
  6. Convert a character expression to a date
Question 5 Multiple Choice (Multiple Answers)

Which two statements are true regarding the ORDER BY clause? (Choose two)

  1. The sort is in ascending by order by default
  2. The sort is in descending order by default
  3. The ORDER BY clause must precede the WHERE clause
  4. The ORDER BY clause is executed on the client side
  5. The ORDER BY clause comes last in the SELECT statement
  6. The ORDER BY clause is executed first in the query execution
Question 6 Multiple Choice (Single Answer)

The UPDATE SQL clause can…

  1. update more than one row at a time.
  2. delete more than one row at a time.
  3. update only one row at a time.
  4. delete only one row at a time.
Question 7 Multiple Choice (Multiple Answers)

Which are DML statements? (Choose all that apply)

  1. COMMIT
  2. MERGE
  3. UPDATE
  4. DELETE
  5. CREATE
  6. DROP
Question 8 Multiple Choice (Single Answer)

Which of the following SQL clauses specifies a search condition?

  1. FROM
  2. SEARCH
  3. WHERE
  4. while
Question 9 Multiple Choice (Single Answer)

Which of the following is the most serious type of redo log file failure?

  1. The loss of an entire redo log file group, but no loss in any other group
  2. The loss of one member of each redo log file group
  3. The failure of the ARC0 background process
  4. The failure of the LGWR background process
Question 10 Multiple Choice (Single Answer)

When the database is in ARCHIVELOG mode, database recovery is possible up to which event or time?

  1. The last redo log file switch
  2. The last checkpoint position
  3. The last commit
  4. The last incremental backup using RMAN
Question 11 Multiple Choice (Single Answer)

Which of the following commands places the database in ARCHIVELOG mode?

  1. ALTER SYSTEM ARCHIVELOG;
  2. ALTER DATABASE ARCHIVELOG;
  3. ALTER SYSTEM SET ARCHIVELOG=TRUE;
  4. ALTER DATABASE ENABLE ARCHIVELOG MODE;
  5. ALTER DATABASE ARCHIVELOG MODE;
Question 12 Multiple Choice (Single Answer)

To place the database into ARCHIVELOG mode, in which state must you start the database?

  1. MOUNT
  2. NOMOUNT
  3. OPEN
  4. SHUTDOWN
  5. Any of the above
Question 13 Multiple Choice (Single Answer)

What is the biggest advantage of having the control files on different disks?

  1. Database performance
  2. Guards against failure
  3. Faster archiving
  4. Writes are concurrent, so having control files on different disks speeds up control file writes
Question 14 Multiple Choice (Single Answer)

Which statement adds a member /logs/redo22.log to redo log file group 2?

  1. ALTER DATABASE ADD LOGFILE ‘/logs/redo22.log’ TO GROUP 2;
  2. ALTER DATABASE ADD LOGFILE MEMBER ‘/logs/redo22.log’ TO GROUP 2;
  3. ALTER DATABASE ADD MEMBER ‘/logs/redo22.log’ TO GROUP 2;
  4. ALTER DATABASE ADD LOGFILE ‘/logs/redo22.log’;
Question 15 Multiple Choice (Single Answer)

Which initialization parameter contains the value used as the default for archived log file destination 10?

  1. LOG_ARCHIVE_DEST
  2. STANDBY_ARCHIVE_DEST
  3. LOG_ARCHIVE_DUPLEX_DEST
  4. DB_RECOVERY_FILE_DEST
  5. USE_DB_RECOVERY_FILE_DEST
Question 16 Multiple Choice (Single Answer)

Which file records all changes made to the database and is used only when recovering an instance?

  1. Archive log file
  2. Redo log file
  3. Control file
  4. Alert log file
Question 17 Multiple Choice (Single Answer)

Which data dictionary view shows that the database is in ARCHIVELOG mode?

  1. V$INSTANCE
  2. V$LOG
  3. V$DATABASE
  4. V$THREAD
Question 18 Multiple Choice (Single Answer)

Following is not a part of SQL.

  1. Commit
  2. Cursors
  3. savepoint
  4. truncate
Question 19 Multiple Choice (Single Answer)

Which of the following will automatically order the result.

  1. Union All
  2. Distinct
  3. Unique
  4. Intersect
Question 20 Multiple Choice (Single Answer)

Which one will get higher priority

  1. Union
  2. Intersect
  3. Minus
  4. None of above