A this function is invalid b this function can be

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: p_first, 1, 1) || SUBSRE(p_last, 1, 7) || RETURN v_email_name; END / Which two statements are true? A. This function is invalid. B. This function can be used against any table. C. This function cannot be used in a SELECT statement. D. This function can be used only if the two parameters passed in are not bull values. E. This function will generate a string based on 2 character values passed into the function. F. This function can be used only on tables where there is a p_first and p_last column. Answer: D, E Explanation: Answer D is a correct response. If any of the parameters passed in are null then the result will be null and the function will attempt to return a NULL value. Answer E This function concatenates the first character of the first name and the first seven characters of the last name which are passed in as parameters www.ExamMagic.com 1Z0-147 WWW.ExamMagi c.COM - 92: Examine the code examples. Which one is correct? A. CREATE OR REPLACE TRIGGER authorize_action BEFORE INSERT ON EMPLOYEES CALL log_exectution; / B. CREATE OR REPLACE TRIGGER authorize_action BEFORE EMPLOYEES INSERT CALL log_exectution; C. CREATE OR REPLACE TRIGGER authorize_action BEFORE EMPLOYEES INSERT CALL log_exectution; D. CREATE OR REPLACE TRIGGER authorize_action CALL log_exectution; BEFORE INSERT ON EMPLOYEES; / Answer: A Explanation: Answer A is the correct syntax for creating a Trigger and calling a procedure Incorrect answers: Answer B is incorrect. This is incorrect syntax for creating a Trigger Answers C and D are incorrect syntax and will result in an error WWW.ExamMagic.COM - 93: You need to create a DML trigger. Which five pieces need to be identified? (Choose five) A. Table B. DML event C. Trigger body D. Package body E. Package name F. Trigger name G. System event H. Trigger timing Answer: A, B, C, F, H www.ExamMagic.com 1Z0-147 Explanation: Incorrect answers: D. A Package body is not part of a trigger. You may call procedure which can be written in PL/SQL, JAVA or C that is part of a package but this is not required. E. Package Name. A package is not part of the trigger definition G. System Event is not associated with a DML Trigger WWW.ExamMagic.COM - 94: Procedure PROCESS_EMP references the table EMP. Procedure UPDATE_EMP updates rows if table EMP through procedure PROCESS_EMP. There is a remote procedure QUERY_EMP that queries the EMP table through the local procedure PROCESS_EMP. The dependency mode is set to TIMESTAMP in this session. Which two statements are true? (Choose two) A. If the signature of procedure PROCESS_EMP is modified and successfully recompiles, the EMP table is invalidated. B. If internal logic of procedure PROCESS_EMP is modified and successfully recompiles, UPDATE_EMP gets invalidated and will recompile when invoked for the first time. C. If the signature of procedure PROCESS_EMP is modified and successfully recompiles, UPDATE_EMP gets invalidated and will recompile when invoked for the first time. D. If internal logic of procedure PROCESS_EMP is modified and successfully recompiles, QUERY_EMP gets invalidated and will recompile when invoked for the first time. E. If internal logic of procedure PROCESS_EMP is modified and successfully recompiles, QUERY_EMP gets invalidated and will recompile when invoked for the second time. Answer: B, E Explanation: B. The UPDATE_EMP references the local Procedure PROCESS_EMP. Local Dependent objects are immediately set to invalid whenever the referenced object is changed. The Oracle server will recompile the dependent object upon execution. E. Since QUERY_EMP is a remote procedure, this procedure will be set to invalid the first time that it executes and it will recompile the second time that it is invoked Incorrect Answers A. We are using Timestamp checking not signature checking. The EMP Table is the www.ExamMagic.com 1Z0-147 referenced object. If the definition of a referenced object is changed or modified, its dependent objects become invalid. Modifying any of the dependent procedures (Emp Table in this case) will not invalidate the referenced object regardless of the mode to check dependencies. C. In this scenario we are using TimeStamp method not the Signature method. D. Since QUERY_EMP is a remote procedure, this procedure will be set to invalid the first time that it executes and it will recompile the second time that it is invoked. WWW.ExamMagic.COM - 95: Examine this package: CREATE OR REPLACE PACKAGE pack_cur IS CURSOR c1 IS SELECT prodid FROM poduct ORDER BY prodid DESC; PROCEDURE proc1; PROCEDURE proc2; END pack_cur; / CREATE OR REPLACE PACKAGE BODY pack_cur IS v_prodid NUMBER; PROCEDURE proc1 IS BEGIN OPEN C1 LOOP FETCH C1 INTO v_prodid; DBMS_OUTPUT.PUT_LINE ( 'Row is: '| | c1%ROWCOUNT); EXIT WHEN c1%ROWCONT >= 3; END LOOP; END procl; PROCEDURE proc2 IS BEGIN LOOP FETCH C1 INTO v_prodid; DBMS_OUTPUT.PUT_LINE ( 'Row is: '| | c1%ROWCOUNT); EXIT WHEN c1%ROWCONT >= 6; END LOOP; CLOSE C1; END proc2; END pack_cur; / www.ExamMagic.com 1Z0-147 The product...
View Full Document

This note was uploaded on 01/05/2011 for the course COMS 131 taught by Professor Dad during the Spring '10 term at University of Mumbai.

Ask a homework question - tutors are online