16.
User system granted SELECT on sh.products to user ian using WITH GRANT OPTION. Ian then
granted SELECT on sh.products to user stuart. Ian has left the company, and his account is
dropped. What happens to Stuart's privileges on sh.products?
- A.Stuart loses his SELECT privilege on sh.products.
- B.Stuart retains his SELECT privilege on sh.products.
- C.Stuart loses his SELECT privilege if Ian was dropped with the CASCADE REVOKE option.
- D.Stuart retains his SELECT privilege if Ian was dropped with the NOCASCADE REVOKE option.
- Answer & Explanation
- Report
Answer : [A]
Explanation :
Explanation :
When object privileges are granted through an intermediary, they are implicitly dropped when the intermediary is dropped. There are no CASCADE REVOKE or NOCASCADE REVOKE options. |
17.
User system granted SELECT ANY TABLE to user ian using WITH ADMIN OPTION. Ian then
granted SELECT ANY TABLE to user stuart. Ian has left the company, and his account is
dropped. What happens to Stuart's privileges?
- A.Stuart loses his privileges.
- B.Stuart retains his privileges.
- C.Stuart loses his privileges if Ian was dropped with the CASCADE REVOKE option.
- D.Stuart retains his privileges if Ian was dropped with the NOCASCADE REVOKE option.
- Answer & Explanation
- Report
Answer : [B]
Explanation :
Explanation :
When system privileges are granted through an intermediary, they are not affected when the intermediary is dropped. There are no CASCADE REVOKE or NOCASCADE REVOKE options. |
18.
Which of the following system privileges can allow the grantee to masquerade as another user
and therefore should be granted judiciously?
- A.CREATE ANY JOB
- B.ALTER USER
- C.CREATE ANY PROCEDURE
- D.All of the above
- Answer & Explanation
- Report
Answer : [D]
Explanation :
Explanation :
The CREATE ANY JOB and CREATE ANY PROCEDURE system privileges allow the grantee to create and run programs with the privileges of another user. The ALTER USER PRIVILEGE allows the grantee to change a user's password, connect as that user, and then change the password back. These are all powerful system privileges and should be restricted to as few administrative users as practical. |
19.
Which of the following statements enables the role user_admin in the current session?
- A.alter session enable role user_admin;
- B.alter session set role user_admin;
- C.alter role user_admin enable;
- D.set role user_admin;
- Answer & Explanation
- Report
Answer : [D]
Explanation :
Explanation :
The SET ROLE statement enables or disables roles in the current session. |
20.
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?
- A.set role all;
- B.alter user augustin default role all;
- C.alter session enable role info_czar;
- D.alter session enable info_czar identified by brozo
- Answer & Explanation
- Report
Answer : [B]
Explanation :
Explanation :
To enable a password-protected role, you need to either execute a SET ROLE statement specifying the password or alter the user to make the role a default role. Default roles do not require a set role statement or a password to become enabled. |