Exam 1z0-908 All QuestionsBrowse all questions from this exam
Question 57

Examine this statement:

mysql> DROP ROLE r_role1, r_role2;

Which two are true? (Choose two.)

    Correct Answer: A, F

    The statement DROP ROLE will fail if any of the roles specified are mentioned in the mandatory_roles variable, as roles named in the mandatory_roles system variable cannot be dropped. Additionally, it will also fail if at least one of the roles does not exist, since attempting to drop a non-existent role without using the IF EXISTS clause will result in an error.

Discussion
FelipeKOptions: BC

B. This is true. Before dropping a role, you need to make sure that the role is not assigned to any user or any other role. Otherwise, the DROP ROLE statement will fail with an error message. C. This is also true. Existing connections that are currently using the privileges of the roles being dropped can continue to do so until they disconnect and reconnect.

FelipeK

correction A and F

roobenjOptions: AF

Tested it. A and F are correct options.

FelipeKOptions: AF

A. It fails if any of the roles is specified in the mandatory_roles variable. Roles named in the mandatory_roles system variable value cannot be dropped. F. It fails if at least one of the roles does not exist. By default, an error occurs if you try to drop a role that does not exist. However, if the IF EXISTS clause is given, the statement produces a warning for each named role that does not exist, rather than an error.

marklvOptions: AF

correction, A and F. You don't need to reload connection if role changes.

marklvOptions: CF

I tested it, you can drop a role if users have that role. You need grant and revoke privs to manipulate roles. I also tested deleting a role that didn't exist, it errored. C and F.

dieymirOptions: AF

A and F