Oracle 1Z0-147

Oracle 9i: Program with PL/SQL
132 Q&A

Looking for Real Exam Questions for IT Certification Exams!
We guarantee you can pass any IT certification exam at your first attempt with just 10-12
hours study of our guides.
Our study guides contain actual exam questions, you will get word to word same on your
actual test; accurate answers with detailed explanation verified by experts and all graphics
and drag-n-drop exhibits shown just as on the real test.
To test the quality of our guides, you can download the one-third portion of any guide from
http://www.certificationking.com absolutely free.
Besides, we also offer complete version of following exams absolutely free. You can start
your certification from these free guides and if you are satisfied you can buy the rest
♦ Microsoft: 70-270, 70-305 ♦ Cisco: 642-901 ♦ Oracle: 1Z0-007, 200 ♦ CompTIA: 220-601
♦ SUN: 310-011, 310-043 ♦ Citrix: 1Y0-A01, 1Y0-256 ♦ CIW: 1D0-420 ♦ Novell: 50-686
♦ Adobe: 9A0-029 ♦ Apple: 9L0-005, 9L0-505 ♦ Avaya: 132-S-100 ♦ Cognos: COG-105
♦ CWNP: PW0-100 ♦ EMC: E20-001 ♦ Hyperion: 4H0-002 ♦ HP: HP0-771, HP0-J24
♦ IBM: 000-253, 000-700 ♦ Juniper: JN0-100, JN0-201 ♦ Lotus: LOT-737
♦ Nortel: 920-803 ♦ SAS: A00-201 ♦ SNIA: S10-100 ♦ Sybase: 510-015
♦ Symantec: 250-101 ♦ TeraData: NR0-011

For pricing and placing order, please visit http://certificationking.com/order.html
We accept all major credit cards through www.paypal.com
For other payment options and any further query, feel free to mail us at
info@certificationking.com

Which statement. C. E.com -3- . A stored procedure offers some advantages over a standalone SQL statement. the body. END. D. E www. This procedure must invoke the UPD_BAT_STAT procedure and pass a parameter.) A. such as programmable functionality and compiled code. START UPD_BAT_STAT(V_ID).WRITE procedure to write data to a BFILE.BFILENAME function to locate an external BFILE. By default. V_LAST_NAME). D. D. A stored procedure is stored in the database and can be shared by a number of programs. EXECUTE UPD_BAT_STAT(V_ID). V_LAST_NAME VARCHAR2) IS BEGIN INSERT INTO PLAYER (ID. Answer: B Q: 3 Which three describe a stored procedure? (Choose three. B.LAST_NAME) VALUES (V_ID. C. COMMIT. will successfully invoke the UPD_BAT_STAT procedure? A. Answer: D Q: 2 Examine this procedure: CREATE OR REPLACE PROCEDURE ADD_PLAYER (V_ID IN NUMBER.FILECLOSE procedure to close the file being accessed. Use the DBMS_LOB. Use the DBMS_LOB. B. a stored procedure executes with the privileges of its owner.CertificationKing. Use the DBMS_LOB. Use the DBMS_LOB.FILEEXISTS function to find the location of a BFILE. B. RUN UPD_BAT_STAT(V_ID). C. Answer: B. UPD_BAT_STAT(V_ID).Q: 1 What can you do with the DBMS_LOB package? A. D. A stored procedure has three parts: the specification. when added to the above procedure. A stored procedure is typically written in SQL. and the exception handler part .

END LOOP. H Q: 5 Examine this procedure: CREATE OR REPLACE PROCEDURE INSERT_TEAM (V_ID in NUMBER. B. The product table has more than 1000 rows. I. ERROR at line 1: What is the output in your session? A.proc1 You execute the procedure PROC1 from SQL*Plus with the command: EXECUTE pack_cur. The product table has more than 1000 rows.'AUSTIN'. EXECUTE INSERT_TEAM(3. DBMS_OUTPUT. name) VALUES (v_id. C. PROCEDURE proc1 IS BEGIN OPEN c1. www. DBMS_OUTPUT. END LOOP. / CREATE OR REPLACE PACKAGE BODY pack_cur IS v_prodid NUMBER. v_name). EXIT WHEN c1%ROWCOUNT >= 6. EXIT WHEN c1%ROWCOUNT >= 3.PUT_LINE('Row is: ' || c1%ROWCOUNT). F.proc1 What is the output in your session? What is the output in your session? A. E. B. LOOP FETCH c1 INTO v_prodid. PROCEDURE proc2 IS BEGIN LOOP FETCH c1 INTO v_prodid. ERROR at line 1: Row is: Row is: Row is: Row is: Row is: 1 Row is: Row is: 1 Row is: 2 Row is: 1 Row is: 2 Row is: 3 Row is: 1 Row is: 2 Row is: 3 Row is: 2 Row is: 3 Row is: 4 Row is: 4 Row is: 5 Row is: 4 Row is: 5 Row is: 6 Row is: 5 Row is: 6 Answer: E. G. PROCEDURE proc1. H. G. D. V_NAME=>'LONGHORNS'. EXECUTE INSERT_TEAM. END proc1. / The product table has more than 1000 rows. v_city.CertificationKing. Which two statements will successfully invoke this procedure in SQL*Plus? (Choose two. You execute the procedure PROC1 from SQL*Plus with the command: EXECUTE pack_cur. ERROR at line 1: A. Row is: A. ERROR at line 1: B. END proc2. I. COMMIT. F. END pack_cur. CLOSE c1.proc1 What is the output in your session? EXECUTE pack_cur.com -4- . PROCEDURE proc2. You execute the procedure PROC1 from SQL*Plus with the command: The product table has more than 1000 rows. The SQL*Plus SERVEROUTPUT setting is turned on in your session. V_CITY in VARCHAR2 DEFAULT 'AUSTIN'.'LONGHORNS'). The SQL*Plus SERVEROUTPUT setting is turned on in your session. END pack_cur.Q: 4 Examine this package: CREATE OR REPLACE PACKAGE pack_cur IS CURSOR c1 IS SELECT prodid FROM product ORDER BY prodid DESC. V_CITY=>'AUSTIN'). V_NAME in VARCHAR2) IS BEGIN INSERT INTO TEAM (id. C. EXECUTE INSERT_TEAM(3. I.PUT_LINE('Row is: ' ||c1%ROWCOUNT). The SQL*Plus SERVEROUTPUT setting is turned on in your session. The SQL*Plus SERVEROUTPUT setting is turned on in your session.) A.proc1 You execute the procedure PROC1 from SQL*Plus with the command: EXECUTE pack_cur. END. city.

G. table DML event trigger body package body package name trigger name system event trigger timing Answer: A. D. F. To which type must you convert the trigger to correct the error? A. END. E.0). V_CITY := 'AUSTIN').com -5- .D. H Q: 7 This statement fails when executed: CREATE OR REPLACE TRIGGER CALC_TEAM_AVG AFTER INSERT ON PLAYER BEGIN INSERT INTO PLAYER_BAT_STAT (PLAYER_ID. EXECUTE INSERT_TEAM (3. D. C.'LONGHORNS').CertificationKing. B. C Q: 6 You need to create a DML trigger. Which five pieces need to be identified? (Choose five. B.AT_BATS. C. H. 0. C. row statement ORACLE FORM trigger before Answer: A Q: 8 Examine this package: Which statement is true? www.) A. B. E. V_NAME := 'LONGHORNS'. F.ID.HITS) VALUES (:NEW. Answer: B. 1997. EXECUTE INSERT_TEAM (V_ID := 3. SEASON_YEAR.

00 each time the procedure DISPLAY_PRICE is invoked. Answer: D Q: 9 Examine this code: Which statement is true? www.com -6- . The value of DISCOUNT_RATE is set to 0. B.00 in a session. D. The value of DISCOUNT_RATE is set to 1.10 when the package is invoked for the first time in a session.10 each time the package is invoked in a session. C.CertificationKing.A. The value of DISCOUNT_RATE always remains 0. The value of DISCOUNT_RATE is set to 0.

g_comm has a value of 20 at 9:06am for both Jones and Smith. D. F.A. g_comm has a value of 15 at 9:06am for Smith. g_comm has a value of 15 at 9:06am for Jones. Answer: B Q: 10 Examine this code: Which statement removes the function? www. B. g_comm has a value of 15 at 9:03am for both Jones and Smith. g_comm has a value of 10 at 9:03 for both Jones and Smith. g_comm has a value of 10 at 9:06am for both Jones and Smith.com -7- . E.CertificationKing. C.

Answer: E Q: 11 The add_player . DROP FUNCTION gen_email_name. D. B.CertificationKing. and upd_pitcher_stat procedures are grouped together in a package. in the package body in a database trigger in the package specification in each procedure's DECLARE section. F. Where should you declare this variable? A. upd_player_stat . C. E. D. DELETE gen_email_name. B.com -8- .A. C. REMOVE gen_email_name. TRUNCATE gen_email_name. DROP gen_email_name. A variable must be shared among only these procedures. ALTER FUNCTION gen_email_name REMOVE. using the exact same name in each Answer: A Q: 12 Examine this code: What type of trigger is it? www.

C. DML trigger INSTEAD OF trigger application trigger system event trigger This is an invalid trigger. D. UPDATE. An area of memory is established to process the SQL statement. E. C. The rows are selected and ordered. The area of memory established to process the SQL statement is released. The validity of the SQL statement is established.CertificationKing.com -9- . B. D.A. The SQL statement is run and the number of rows processed is returned. Answer: E Q: 13 What happens during the execute phase with dynamic SQL for INSERT. E. and DELETE operations? A. B. Answer: D Q: 14 Examine this package: How many public procedures are in the MANAGE_EMPS package? www.

CertificationKing.www.com .10 - .

com . Which command do you use to remove the trigger in the SQL*Plus environment? A.11 - . www. E.CertificationKing. F. DROP TRIGGER business_hour.A. D. two C. three four five none Answer: F Q: 15 You need to remove the database trigger BUSINESS_HOUR. one B.

UPDATE_EMP gets invalidated and will recompile when invoked for the first time.B. REMOVE TRIGGER business_hour. E. long_col LONG). D.) A.com . If internal logic of procedure PROCESS_EMP is modified and successfully recompiles. DELETE TRIGGER business_hour. E.12 - . B. C.) A. B. ALTER TRIGGER business_hour REMOVE. If internal logic of procedure PROCESS_EMP is modified and successfully recompiles. If the signature of procedure PROCESS_EMP is modified and successfully recompiles. B. There is a remote procedure QUERY_EMP that queries the EMP table through the local procedure PROCESS_EMP . the EMP table is invalidated. Answer: B. Answer: A Q: 16 Which three are valid ways to minimize dependency failure? (Choose three. Procedure UPDATE_EMP updates rows of table EMP through procedure PROCESS_EMP . D Q: 17 Procedure PROCESS_EMP references the table EMP . You need to convert the LONG_COL column from a LONG data type to a LOB data type. DELETE FROM USER_TRIGGERS WHERE TRIGGER_NAME = 'BUSINESS_HOUR'.CertificationKing. C. Which two statements are true? (Choose two. UPDATE_EMP gets invalidated and will recompile when invoked for the first time. The dependency mode is set to TIMESTAMP in this session. QUERY_EMP gets invalidated and will recompile when invoked for the first time. If the signature of procedure PROCESS_EMP is modified and successfully recompiles. D. Which statement accomplishes this task? www. QUERY_EMP gets invalidated and will recompile when invoked for the second time. C. E Q: 18 You have a table with the following definition: CREATE TABLE long_tab (id NUMBER. If internal logic of procedure PROCESS_EMP is modified and successfully recompiles.procedure notation while executing procedures Answer: A. E. D. querying with the SELECT * notation declaring variables with the %TYPE attribute specifying schema names when referencing objects declaring records by using the %ROWTYPE attribute specifying package.

A.migrate(long_tab. This function can be used only if the two parameters passed in are not null values. long_col. This function can be used against any table.13 - . D. www. clob) EXECUTE utl_manage_lob.migrate(long_tab. C. This function cannot be used in a SELECT statement.lob. long_col. E. D. clob) Answer: A Q: 19 Examine this code: Which two statements are true? (Choose two.) A. long_col. E. This function is invalid. This function can be used only on tables where there is a p_first and p_last column. This function will generate a string based on 2 character values passed into the function.com . You only want your users to insert into this table using the ADD_PLAYER procedure. EXECUTE dbms_lob. B.) A. GRANT SELECT ON ADD_PLAYER TO PUBLIC.migrate(long_tab. E Q: 20 All users currently have the INSERT privilege on the PLAYER table.migrate(long_tab. Answer: B. Which two actions must you take? (Choose two. long_col. B. C. F.CertificationKing. ALTER TABLE long_tab MODIFY (LONG_COL CLOB). clob) EXECUTE dbms_manage. clob) EXECUTE utl_lob.

C.14 - . What is the output in your session from the PROC2 procedure? www. GRANT INSERT ON PLAYER TO PUBLIC. D. GRANT EXECUTE ON ADD_PLAYER TO PUBLIC. GRANT EXECUTE. You then execute the procedure PROC2 from the SQL*Plus with the command EXECUTE pack_cur.INSERT ON ADD_PLAYER TO PUBLIC.PROC1.com . The SQL *Plus SERVEROUTPUT setting is turned on in your session.PROC2.CertificationKing.B. E Q: 21 Examine this package: The product table has more than 1000 rows. E. Answer: B. You execute the procedure PROC1 from SQL*Plus with the command: EXECUTE pack_cur. REVOKE INSERT ON PLAYER FROM PUBLIC.

15 - . Row is: Row is: Row is: www.A. ERROR at line 1: B.com .CertificationKing.

which construct allows you to transfer values to and from the calling environment? A. E. B. C. HEADER only DECLARATIVE EXECUTABLE and HEADER DECLARATIVE. Row is:1 Row is: 2 Row is: 3 D.16 - . B. B. USER_SOURCE UTL_DEPTREE USER_OBJECTS DEPTREE_TEMPTAB USER_DEPENDENCIES DBA_DEPENDENT_OBJECTS Answer: D.C. in which section will you typically find the RETURN keyword? A. E Q: 23 When creating a function. C.com . D.CertificationKing. D.) A. F. C.EXECUTABLE and EXCEPTION HANDLING Answer: C Q: 24 When creating stored procedures and functions. D. Row is: 4 Row is: 5 Row is: 6 Answer: D Q: 22 Which two dictionary views track dependencies? (Choose two. local variables arguments Boolean variables substitution variables Answer: B Q: 25 You have the following table: You create this trigger: www.

0 WHERE Department_id = 20.17 - . / Then.SALary. :new.CREATE OR REPLACE TRIGGER Log_salary_increase AFTER UPDATE ON employees FOR EACH ROW WHEN (new.Salary > 1000) BEGIN INSER INTO Emp_log (Emp_id. New_salary. Action) VALUES (:new.Employee_id.com . END.CertificationKing. SYSDATE. Log_date. What are the results in the EMP_LOG table? www. 'NEW SAL'). you enter the following SQL statement: UPDATE Employees SET Salary = Salary + 1000.

www.18 - .CertificationKing.com .

B.A. D.19 - .com . Answer: C Q: 27 Which two tables or views track object dependencies? (Choose two). C. The COMMIT and ROLLBACK commands are allowed in the packaged function. UPDATE. The packaged function can execute an INSERT. D. or DELETE statement against the table that is being queried if it is used in a subquery. or DELETE statement against the table that is being queried. or DELETE statement against the table that is being queried if the pragma RESTRICT REFERENCES is used. www. You can not use packaged functions in a query statement. The packaged function can execute an INSERT.CertificationKing. picture picture picture No rows are inserted Answer: B Q: 26 When using a packaged function in a query. E. UPDATE. B. what is true? A. UPDATE. C. The packaged function cannot execute an INSERT.

D. USER_PROCEDURES USER_PROCS USER_OBJECTS USER_PLSQL_UNITS Answer: C Q: 29 Which two statements about packages are true? (Choose two. D. A package is loaded into memory each time it is invoked.A. You can achieve information hiding by making package constructs private. B. E. You use a system event trigger to fire when an UPDATE statement occurs. C. D. C Q: 28 Which table should you query to determine when your procedure was last compiled? A. Packages can be nested.CertificationKing. You use a database trigger to fire when an INSERT statement occurs. B. C. You use an application trigger to fire when a DELETE statement occurs. You use an INSTEAD OF trigger to fire when a SELECT statement occurs. C. E.20 - . Answer: D. Answer: B www. B. USER_DEPENDENCIES USER_IDEPTREE IDEPTREE USER_DEPTREE USER_DEPENDS Answer: A. C.) A. The contents of packages can be shared by many applications. D. B.com . You can pass parameters to packages. E Q: 30 Which statement about triggers is true? A.

C. E.) A.) A. calc_sal(salary) FROM employees ORDER BY calc_sal(salary). DELETE FROM employees(calc_sal(salary)) WHERE calc_sal(salary) > 1000.Q: 31 Which two statements about the overloading feature of packages are true? (Choose two. D. Only local or packaged subprograms can be overloaded. INSERT calc_sal(salary) INTO employees WHERE department_id = 60. D. E Q: 33 Which part of a database trigger determines the number of times the trigger body executes? A. Overloading allows different functions with the same name that differ only in their return types. B. SELECT salary. type and order of parameters. Overloading allows different subprograms with the same name and same number or type of parameters. salary.CertificationKing. trigger type B. calc_sal(salary) FROM employees WHERE department_id = 60. E Q: 32 Examine this code: Which statements accurately call the stored function CALC_SAL ? (Choose two. Overloading allows different subprograms with same name. Overloading allows different subprograms with the same name number. Answer: D.com . B. E. trigger body www.21 - . type or order of parameters. SELECT last_name. but different in either number. UPDATE employees (calc_sal(salary)) SET salary = salary * calc_sal(salary). C. Answer: A.

22 - . CREATE OR REPLACE TRIGGER authorize_action CALL log_execution BEFORE INSERT ON EMPLOYEES.C.CertificationKing. B. / Answer: B Q: 35 Examine this code: What does this trigger do? A. CREATE OR REPLACE TRIGGER authorize_action BEFORE INSERT ON EMPLOYEES CALL log_execution. The trigger records an audit trail when a user makes changes to the database. Which one is correct? A. The trigger marks the user as logged on to the database before an audit statement is issued. trigger timing Answer: A Q: 34 Examine the code examples.com . The trigger invokes the procedure audit_action each time a user logs on to his/her schema and adds the username to the audit table. CREATE OR REPLACE TRIGGER authorize_action BEFORE INSERT ON EMPLOYEES CALL log_execution / C. CREATE OR REPLACE TRIGGER authorize_action BEFORE EMPLOYEES INSERT CALL log_execution. C. trigger event D. D. www. / B.

Sign up to vote on this title
UsefulNot useful