nerdexam
Oracle

1Z0-141 · Question #115

View the Exhibit. You are coding a trigger (shown in the exhibit) to display the database error that occurs when users encounter the FRM-40505 error about being unable to execute a query. You have…

The correct answer is B. Change the n variable to a NUMBER data type and change SLQERRM to. See the full explanation below for the reasoning.

Question

View the Exhibit. You are coding a trigger (shown in the exhibit) to display the database error that occurs when users encounter the FRM-40505 error about being unable to execute a query. You have created an alert called Query_Alert. For the FRM-40505 error, the trigger should display the database error message in the Query_Alert. For all other errors, the trigger should display default messages on the console message line. Examine the code for the On-Error trigger. When you attempt to compile this trigger, you receive a compilation error with the message "Error 215 at line 2, column 4: String length constraints must be in range (1..32767)". What corrections should you make so that the trigger compiles and functions properly?

Exhibit

1Z0-141 question #115 exhibit

Options

  • AEliminate the n variable because SHOW_ALERT does not return a value.
  • BChange the n variable to a NUMBER data type and change SLQERRM to
  • CChange the n variable to a NUMBER data type, replace SHOW_ALERT with FIND_ALERT,
  • DChange all occurrences of error_code, error_type, and error_text to message_code,

How the community answered

(27 responses)
  • A
    4% (1)
  • B
    74% (20)
  • C
    15% (4)
  • D
    7% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-141 Practice