User Management - Quiz Explanation

  Explanation of answers
The answers you selected are indicated below, along with text that explains the correct answers.
1. You want to remove a user from your database and you are certain that the user owns no data. Which command should you use?
Please select the best answer.
  A. DROP USER username CASCADE
  B. DELETE username FROM DATABASE
  C. DROP USER username
  D. DELETE USER username
  The correct answer is C. Use DROP USER username; when you are confident the user/schema owns no objects. Only use CASCADE when you intentionally want Oracle to drop the user and all objects owned by that user.

2. One of your fellow employees is taking a 3-month leave of absence. What is the best way to secure his account while he is gone?
Please select the best answer.
  A. Change his password to something only you know
  B. Lock his account
  C. Revoke his CREATE SESSION privilege
  D. Drop the user from the database
  The correct answer is B. Locking the account is the cleanest and most explicit control for a temporary leave of absence. It prevents logins without changing privileges or passwords, and it is easy to reverse when the user returns. Revoking CREATE SESSION can also block logins, but it is easier for another administrator to re-grant later. Changing the password works, but it introduces coordination overhead and increases the chance of an unintended reset during the absence.

3. Which of the following commands will change Harold's password to WINDY_CITY?
Please select the best answer.
  A. ALTER USER HAROLD PASSWORD WINDY_CITY
  B. ALTER USER HAROLD IDENTIFIED BY WINDY_CITY
  C. ALTER USER HAROLD IDENTIFIED BY VALUES 'WINDY_CITY'
  D. ALTER USER HAROLD IDENTIFIED BY PASSWORD 'WINDY_CITY'
  The correct answer is B. In Oracle, ALTER USER ... IDENTIFIED BY ... is the standard syntax for setting a user’s password. The other options shown are not valid password reset syntax for normal administration.

4. You want to reset a user's password, but you do not want to know it yourself. What is the best way to handle this situation?
Please select the best answer.
  A. Give the user the SYSTEM password, so he or she can reset the personal password without you looking
  B. Log the user into your terminal as SYSTEM, and walk away so he or she can change the password
  C. Change the user's password yourself, but pre-expire it so the user is forced to change it again
  D. Type in a random series of characters without looking , so that even you won't know the result
  The correct answer is C. Best practice is to set a temporary password and force a change at next login, for example: ALTER USER username IDENTIFIED BY temporary_password PASSWORD EXPIRE; This ensures the user must choose a new password immediately, so the temporary password is not the long-term credential.