nerdexam
Oracle

1Z0-909 · Question #44

Which statement is true about the show errors command?

The correct answer is A. It displays the total number of errors, warnings, and notes since the beginning of the current. SHOW ERRORS is session-scoped - it displays diagnostic information accumulated since the beginning of the current client session, making A correct. The scope boundary is the session, not the server's lifecycle. Why each distractor is wrong: B is wrong because the scope is the…

Stored Programs

Question

Which statement is true about the show errors command?

Options

  • AIt displays the total number of errors, warnings, and notes since the beginning of the current
  • BIt displays the total number of errors, warnings, and notes since the server last restarted.
  • CIt cannot display information for more than max_errot_count server system variable setting.
  • DIt displays errors messages only, since the start time of the current session.
  • EIt displays errors messages only, since the server last restarted.
  • FIt displays similar diagnostics results as get diagnostics.

How the community answered

(39 responses)
  • A
    90% (35)
  • B
    3% (1)
  • D
    5% (2)
  • F
    3% (1)

Explanation

SHOW ERRORS is session-scoped - it displays diagnostic information accumulated since the beginning of the current client session, making A correct. The scope boundary is the session, not the server's lifecycle.

Why each distractor is wrong:

  • B is wrong because the scope is the current session, not since the last server restart - restarting the server wouldn't reset session-level diagnostics that don't exist yet for a new session.
  • C is wrong because max_error_count does constrain what MySQL stores and thus what SHOW ERRORS can return - but this makes C true, not false, so it fails as a "trick" only if misread; the statement as written is actually a valid behavior of the command, yet it's not the best or most complete characterization.
  • D and E are wrong because they claim SHOW ERRORS shows errors only - in contrast, SHOW ERRORS (and especially SHOW WARNINGS) captures the full diagnostic set including warnings and notes.
  • F is wrong because GET DIAGNOSTICS (the SQL standard mechanism) returns information about the most recent SQL statement only, while SHOW ERRORS aggregates across the session.

Memory tip: Think "S-E-S-S-I-O-N" - SHOW ERRORS belongs to the Session. Anything tying it to server restarts (B, E) is out of scope, and anything claiming it shows only errors (D, E) confuses it with a narrower behavior.

Topics

#SHOW ERRORS command#PL/SQL diagnostics#Session scope#Error messages

Community Discussion

No community discussion yet for this question.

Full 1Z0-909 Practice