nerdexam
Oracle

1Z0-144 · Question #79

Which two statements are true about anonymous blocks and named subprograms? (Choose two)

The correct answer is A. Subprograms are by default executed with definer's rights. B. The declare section is optional for both anonymous blocks and subprograms. By default, stored procedures and SQL methods execute with the privileges of their owner, not their current user. Such definer's rights subprograms are bound to the schema in which they reside, allowing you to refer to objects in the same schema without qualifying their names.

Creating Stored Procedures and Functions

Question

Which two statements are true about anonymous blocks and named subprograms? (Choose two)

Options

  • ASubprograms are by default executed with definer's rights.
  • BThe declare section is optional for both anonymous blocks and subprograms.
  • CBoth anonymous blocks and subprograms execute by default with invoker's rights.
  • DThe declare section is mandatory for anonymous blocks and optional for subprograms.

How the community answered

(25 responses)
  • A
    76% (19)
  • C
    16% (4)
  • D
    8% (2)

Explanation

By default, stored procedures and SQL methods execute with the privileges of their owner, not their current user. Such definer's rights subprograms are bound to the schema in which they reside, allowing you to refer to objects in the same schema without qualifying their names.

Topics

#anonymous blocks#subprograms#definer rights#invoker rights

Community Discussion

No community discussion yet for this question.

Full 1Z0-144 Practice