SnowPro Advanced: Data Engineer — Question 84

A Data Engineer runs the following sequence:

use role ACCOUNTADMIN;
create role ROLE1;
grant role ROLE1 to role ACCOUNTADMIN;
grant create database on account to role ROLE1;

use role ROLE1;
create database DB1;

use role ACCOUNTADMIN;
drop role ROLE1;

Who is the owner of database DB1?

Answer options

Correct answer: B

Explanation

The correct answer is B because when ROLE1 is dropped after creating DB1, ownership defaults to ACCOUNTADMIN. Option A is incorrect as ROLE1 is deleted and cannot own DB1 anymore. Option C is wrong because a role can be dropped regardless of ownership, and option D is not valid since the database must have an owner.