Unformatted text preview: using the :NEW prefix
and refer to the data already in the database using the :OLD prefix.
D. These are System Events that can be used with triggers but they have no bearing on
WWW.ExamMagic.COM - 68: Examine this package specification:
CREATE OR REPLACE PACKAGE concat_all
PROCEDURE combine (p_num_val NUMBER);
PROCEDURE combine (p_date_val DATE);
PROCEDURE combine (p_char_val VARCHAR2, p_num_val NUMBER);
Which overloaded COMBINE procedure declaration can be added to
this package specification?
A. PROCEDURE combine;
B. PROCEDURE combine (p_no NUMBER);
C. PROCEDURE combine (p_val_1 VARCHAR2, p_val_2 NUMBER;
D. PROCEDURE concat_all
(p_num_val VARCHAR2, p_char_val NUMBER);
You use the package overloading feature when the same operation is performed using
B. This procedure conflicts with the first procedure declaration in that its parameters
differs only by name but have the same data type. You cannot use two procedures with
the same name if their parameters differ only in name or mode.
C. This procedure conflicts with the third procedure declaration in that its parameters
differs only by name but have the same data type.
D. This procdure can't be overloaded because it does not use the same name. Package
overloading allows more than one procedure or function inside the package to use the
WWW.ExamMagic.COM - 69: www.ExamMagic.com 1Z0-147 Local procedure A calls remote procedure B. Procedure B was
compiled at 8 A.M. Procedure A was modified and recompiled
at 9 A.M. Remote procedure B was later modified and
recompiled at 11 A.M.
The dependency mode is set to TIMESTAMP.
What happens when procedure A is invoked at 1 P.M?
A. There is no affect on procedure A and it runs successfully.
B. Procedure B is invalidated and recompiles when invoked.
C. Procedure A is invalidated and recompiles for the first time it is invoked.
D. Procedure A is invalidated and recompiles for the second time it is invoked.
When the local procedure is invoked, at run time the Oracle server compares the two time
stamps of the referenced remote procedure. If the time stamps are equal (indicating that
the remote procedure has not recompiled), the Oracle server executes the local procedure.
If the time stamps are not equal (indicating that the remote procedure has recompiled),
the Oracle server invalidates the local procedure and returns a runtime error.
If the local procedure, which is now tagged as invalid, is invoked a second time, the
Oracle server recompiles it before executing, in accordance with the automatic local
So if a local procedure returns a run-time error the first time that it is invoked, indicating
that the remote procedure's time stamp has changed, you should develop a strategy to
re-invoke the local procedure.
A, B, C
WWW.ExamMagic.COM - 70: Under which two circumstances do you design database triggers? (Choose two)
A. To duplicate the functionality of other triggers.
B. To replicate built-in constraints in the Oracle server such as primary key and foreign
C. To guarantee that when a specific operation is performed, related actions are performed.
D. For centralized, global operations that should be fired for the triggering statement,
regardless of which user or application issues the statement.
Answer: C,D www.ExamMagic.com 1Z0-147
C. When a specific event occurs you can specify that any related code is executed by
implementing a Trigger.
D. Triggers allow you have control regardless of which user or which application made
A. You do not want to create a Trigger when a trigger already exists for the specified
B. You should not create a Trigger to Trigger to perform functionality that is already
built into the Oracle server.
WWW.ExamMagic.COM - 71: Examine this procedure:
CREATE OR REPLACE PROCEDURE DELETE_PLAYER
(V_ID IN NUMBER)
DELETE FROM PLAYER
WHERE ID = V_ID;
('Cannot delete this player, child records exist in PLAYER_BAT_STAT
What prevents this procedure from being created
A. A comma has been left after the STATS_EXIST_EXCEPTION exception.
B. The STATS_EXIST_EXCEPTION has not been declared as a number.
C. The STATS_EXIST_EXCEPTION has not been declared as an exception.
D. Only predefined exceptions are allowed in the EXCEPTION section.
You can't raise an exception that has not been declared.
A. This is the correct syntax for raising an exception.
B. The STATS_EXIST_EXCEPTION needs to be declared as an exception not as a
C. You have use predefined, Non_predefined and User_Defined Exceptions in the
WWW.ExamMagic.COM - 72: Examine this package:
CREATE OR REPLACE PACKAGE manage_emps
tax_rate CONSTANT NUMBER(5,2) := .28;
PROCEDURE insert_emp (p_deptno NUMBER, p_sal NUMBER);
FUNCTION calc_tax (p_sal NUMBER)
CREATE OR REPLACE PACKAGE BODY manage_emps
SET sal = (sal * p_raise_emt) + sal
WHERE empno = v_id;
(p_deptno NUMBER, p_sal NUMBER)
INSERT INTO emp(empno, deptno, sal)
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.
- Spring '10