Multiple choice technology databases

You created stored procedure DELETE_TEMP_TABLE that uses dynamic SQL to remove a table in your schema. You have granted the EXECUTE privilege to user A on this procedure. When user A executes the DELETE_TEMP_TABLE procedure, under whose privileges are the operations performed by default?

  1. SYS privileges

  2. Your privileges

  3. Public privileges

  4. User A’s privileges

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

By default, stored procedures execute with the privileges of the user who invokes them (invoker's rights), not the definer's privileges. When User A executes DELETE_TEMP_TABLE, the operations run under User A's privileges, unless explicitly defined with AUTHID DEFINER to use the creator's rights instead.

AI explanation

To answer this question, let's go through each option:

Option A) SYS privileges - This option is incorrect because the operations performed by the DELETE_TEMP_TABLE procedure are not performed under the SYS privileges. The SYS privileges are typically reserved for the system administrator.

Option B) Your privileges - This option is incorrect because the operations performed by the DELETE_TEMP_TABLE procedure are not performed under your privileges. Your privileges are separate from the privileges granted to user A.

Option C) Public privileges - This option is incorrect because the operations performed by the DELETE_TEMP_TABLE procedure are not performed under the public privileges. Public privileges typically refer to privileges granted to all users.

Option D) User A's privileges - This option is correct. When user A executes the DELETE_TEMP_TABLE procedure, the operations are performed under user A's privileges. The EXECUTE privilege granted to user A on the procedure allows user A to execute the procedure and perform the operations specified within it.

Therefore, the correct answer is option D. The operations performed by the DELETE_TEMP_TABLE procedure are performed under user A's privileges.