[go: up one dir, main page]

0% found this document useful (0 votes)
269 views3 pages

Using Invoker's Rights and Autonomous Transactions

The document is a quiz about using invoker's rights and autonomous transactions in Oracle. It contains 6 multiple choice questions testing the following key points: 1. An autonomous transaction subprogram can be in the same or different package as the calling subprogram. 2. When using invoker's rights, the user executing the procedure needs the privileges granted to the procedure creator. 3. The correct syntax to create a procedure using invoker's rights is CREATE PROCEDURE myproc AUTHID CURRENT_USER IS. 4. A subprogram declared with PRAGMA AUTONOMOUS_TRANSACTION will successfully compile. 5. When a procedure uses invoker's rights, the user executing it will have

Uploaded by

Catalina Achim
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
269 views3 pages

Using Invoker's Rights and Autonomous Transactions

The document is a quiz about using invoker's rights and autonomous transactions in Oracle. It contains 6 multiple choice questions testing the following key points: 1. An autonomous transaction subprogram can be in the same or different package as the calling subprogram. 2. When using invoker's rights, the user executing the procedure needs the privileges granted to the procedure creator. 3. The correct syntax to create a procedure using invoker's rights is CREATE PROCEDURE myproc AUTHID CURRENT_USER IS. 4. A subprogram declared with PRAGMA AUTONOMOUS_TRANSACTION will successfully compile. 5. When a procedure uses invoker's rights, the user executing it will have

Uploaded by

Catalina Achim
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

Test: Quiz: Using Invoker's Rights and Autonomous Transactions 1.

An autonomous transaction subprogram may be in a the same package as th e calling subprogram or may be in a separate subprogram. True or False? Mark for Review (1) Points True False (*)

Correct 2. Procedure GET_EMPS includes a SELECT ... FROM EMPLOYEES. The procedure was created using Invoker's Rights. Which of the following statements are true? (Choose three.) Mark for Review (1) Points (Choose all correct answers) The user who executes the procedure needs EXECUTE privilege on the proce dure. (*) The creator of the procedure needs SELECT privilege on EMPLOYEES. (*) The user who executes the procedure does not need any privileges. The user who executes the procedure needs SELECT privilege on EMPLOYEES. (*)

Correct 3. Which of the following is the correct syntax to create a procedure usin g Invoker's Rights? Mark for Review (1) Points CREATE PROCEDURE myproc IS AUTHID CURRENT_USER BEGIN ... CREATE PROCEDURE myproc AUTHID CURRENT_USER IS BEGIN ... (*)

CREATE PROCEDURE AUTHID CURRENT_USER myproc IS

BEGIN ... CREATE PROCEDURE myproc IS BEGIN AUTHID CURRENT_USER ...

Correct 4. What will happen when the following subprogram is compiled? PROCEDURE at_proc IS PRAGMA AUTONOMOUS_TRANSACTION; dept_id NUMBER := 90; BEGIN UPDATE ... INSERT ... END at_proc; Mark for Review (1) Points The subprogram will fail because it is missing AUTHID CURRENT_USER befor e IS. The autonomous transaction subprogram will fail because it must include COMMIT or ROLLBACK. (*) The compilation will fail because a semicolon after AUTONOMOUS_TRANSACTI ON is not needed. The program will compile successfully.

Incorrect. Refer to Section 9 Lesson 6. 5. User SALLY's schema contains a NEWEMP table. Sally uses Invoker's right s to create procedure GET_NEWEMP which includes the line: SELECT ... FROM NEWEMP ... ; Sally also grants EXECUTE privilege on the procedure to CURLY, but no other priv ileges. What will happen when Curly executes the procedure? Mark for Review (1) Points The procedure will execute successfully. The procedure will fail because Curly does not have SELECT privilege on NEWEMP.

The procedure will fail because there is no NEWEMP table in Curly's sche ma. (*) The procedure will fail because Curly does not have the EXECUTE ANY PROC EDURE system privilege.

Correct 6. Users SYS (the DBA), TOM, DICK and HARRY each have an EMPLOYEES table i n their schemas. SYS creates a procedure DICK.SEL_EMP using Invoker's Rights whi ch contains the following code: SELECT ... FROM EMPLOYEES ... ; HARRY now executes the procedure. Which employees table will be queried? Mark for Review (1) Points SYS.EMPLOYEES DICK.EMPLOYEES HARRY.EMPLOYEES (*) None of the above

Correct

You might also like