This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ct.
C. The Oracle server automatically records dependencies among objects.
D. All schema objects have a status that is recorded in the data dictionary.
E. You can view whether an object is valid or invalid in the USER_STATUS data
F. You can view whether an object is valid or invalid in the USER_OBJECTS data
Incorrect answers: B, D, E
QUESTION 3: You have created a 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?
A. SYS privileges
B. Your privileges
C. Public privileges
D. User A's privileges
E. User A cannot execute your procedure that has dynamic SQL.
When you create a procedure, it will be executed under the privileges of the creator,
Actualtests.com - The Power of Knowing 1Z0-147
unless the procedure has the following statement AUTHID CURRENT_USER. If you
specify AUTHID CURRENT_USER, the privileges of the current user are checked at run
time, and external references are resolved in the schema of the current user. Like this
SQL> CREATE OR REPLACE PROCEDURE delete_temp_table(v_table
2 AUTHID CURRENT_USER
5 EXECUTE IMMEDIATE 'DROP TABLE '||V_TABLE;
If the procedure is create in this way then the EXECUTE IMMEDIATE statement will be
execute under the privilege of the user who executes the procedure, but if we skip line 2
then the procedure will be executed under the privilege of the owner of the procedure.
A: SYS privilege has nothing with is.
C: What is the public privileges? There is nothing called public privileges.
D: This will be true if the procedure contains the AUTHID CURRENT_USER.
E: There is no problem in having a dynamic SQL statement in Procedure.
QUESTION 4: Examine this code:
CREATE OR REPLACE PRODECURE add_dept
(p_dept_name VARCHAR2 DEFAULT 'placeholder',
p_location VARCHAR2 DEFAULT 'Boston')
INSERT INTO departments
View Full Document
This document was uploaded on 03/08/2014.
- Fall '09