Q1. View the Exhibit and examine the structure of the customer table.
You create the following trigger to ensure that customers belonging to category "A" or "B" in the customer table can have a credit limit of more than 8000.
What is the outcome?
A. The trigger is fired, a message is displayed, and the update is successful
B. The trigger is fired and a message is displayed, but the update is rolled back.
C. The trigger is not fired because the when clause should be used to specify the condition, however, the update is successful.
D. The trigger is not fired because column names must be specified with the update event to identify which columns must be changed to cause the trigger to fire, however, the update is successful.
Answer: D
Q2. You create a procedure to handle the processing of bank current accounts which rolls back payment transactions if the overdraft limit is exceeded.
The procedure should return an "error" condition to the caller in a manner consistent with other Oracle server errors.
Which construct should be used to handle this requirement?
A. The SQLERRM function
B. The PRAGMA EXCEPTION_INIT function
C. The RAISE_APPLICATION_ERROR procedure
D. A user-defined exception used with a raise statement
Answer: B
Explanation:
Reference: http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/exceptioninit_pragma.htm#LNPL S01315
Q3. View the Exhibit and examine the blocks of code that you plan to execute.
Which statement is true about the blocks of code?
A. All the blocks execute successfully and the anonymous block displays 1 2 3 cant: 45 45 cnt: 45
B. All the blocks execute successfully and the anonymous block displays 1 2 3 cut: 0 45 cart: 1
C. The anonymous block gives an error because the function invocation in line 2 is not valid.
D. The procedure creation gives an error because the function invocation in line 1 is not valid.
Answer: A
Q4. Which two statements are true about the instead of triggers? (Choose two.)
A. Delete operations cannot be performed using the instead of triggers.
B. The instead or triggers must be created to add or modify data through any view.
C. The instead of triggers can be written only for views, and the before and after timing options are not valid.
D. The check option for views is not enforced when Insertions or updates to the view are performed by using the instead of trigger.
Answer: B,C
Q5. Identify two features of obfuscation. (Choose two.)
A. The Import and Export utilities accept wrapped files.
B. SQL' Plus cannot process the obfuscated source files.
C. Only the wrap utility can obfuscate multiple programs at a time.
D. Both the DBMS_DDL package and the Wrap utility can obfuscate multiple programs at a time.
E. The source code is visible only through the DBA_SOURCE view and not through the USER_SOURCE or ALL_SOURCE View
Answer: A,C
Q6. View the Exhibit to examine the PL/SQL code.
SERVEROUTPUT is on for the session.
Which statement is true about the execution of the code?
A. The execution fails because of the misplaced else clause.
B. The execution is successful even if there is no employee with EMPLOYEE_ID 115.
C. The execution falls and throws exceptions if no employee with EMPLOYEE_ID us is found.
D. The execution is successful, but it displays an incorrect output if no employee with EMPLOYEE_ID 115 is found.
Answer: C
Q7. Which two statements are correct about the usage of parameters in functions? (Choose two.)
A. Functions can have only in mode parameters.
B. Functions called in SQL statements cannot have out or in out mode parameters.
C. Functions having in, out, or in out parameters can be called only in named PL/SQL subprograms
D. Functions having in, out, or in out parameters can be called In PL/SQL procedures and anonymous blocks.
Answer: B,D
Q8. View the Exhibit to examine the PL/SQL code:
SREVROUPUT is on for the session. Which statement Is true about the output of the PL/SQL block?
A. The output is x = y.
B. It produces an error.
C. The output Is x != y.
D. The output Is Can't tell if x and y are equal or not.
Answer: A
Q9. Which two statements are correct about PL/SQL package components? (Choose two)
A. A package must have both specification and body.
B. A package body can exist without the package specification.
C. A package specification can exist without the package body.
D. When a packaged public variable is called for the first time in a session, the entire package is loaded into memory.
Answer: C,D
Q10. View Exhibit1 and examine the structure of the employees table.
View Exhibit2 and examine the code.
What is the outcome when the code is executed?
A. Both blocks compile and execute successfully when called.
B. Both blocks compile successfully but the CALC_SAL procedure gives an error on execution.
C. The CALC_SAL procedure gives an error on compilation because the amt variable should be declared in the RAISE_SALARY procedure.
D. The CALC_SAL procedure gives an error on compilation because the RAISE_SALARY procedure cannot call the stand-alone increase function.
Answer: A