Free Cheat-test Samples and Demo Questions Download
Adobe exams Adobe
Apple exams Apple
Avaya exams Avaya
Check Point exams Check Point
Cisco exams Cisco
Citrix exams Citrix
CIW exams CIW
CompTIA exams CompTIA
CWNP exams CWNP
EC-Council exams EC-Council
EMC exams EMC
Exin exams Exin
Fortinet exams Fortinet
GIAC exams GIAC
Hitachi exams Hitachi
HP exams HP
IBM exams IBM
Isaca exams Isaca
ISC exams ISC
ISEB exams ISEB
Juniper exams Juniper
LPI exams LPI
McAfee exams McAfee
Microsoft exams Microsoft
Oracle exams Oracle
PMI exams PMI
Riverbed exams Riverbed
SNIA exams SAP
Sun exams SAS
Symantec exams Symantec
VMware exams VMware
All certification exams

Oracle 1Z0-101 Exam - Cheat-Test.com

Free 1Z0-101 Sample Questions:

1. 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.
Answer: B

2. You are creating a stored procedure in the SQL*Plus environment. The text of the procedure is stored in a script file. You run the script file to compile the procedure. What happens if the procedure contains syntax errors?
A: Neither the source code, nor the errors are stored in the database.
B: Both the source code and the compilation errors are stored in the database.
C: Compilation errors are appended to the script file that contains the source code.
D: The source code is stored in the database, and the errors are stored in an output file.
E: Only the compilation errors are written to the database, and source code remains in the script file.
Answer: B

3. This statement fails when executed:
CREATE OR REPLACE TRIGGER CALC_TEAM_AVG
AFTER INSERT ON PLAYER
BEGIN
INSERT INTO PLAYER_BAT_STAT (PLAYER_ID, SEASON_YEAR,AT_BATS,HITS)
VALUES (:NEW.ID, 1997, 0,0);
END;
To which type must you convert the trigger to correct the error?
A: row
B: statement
C: ORACLE FORM trigger
D: before
Answer: A

4. The programmer who developed a procedure ACCOUNT_TRANSACTION left the organization. You are assigned the task of modifying this procedure. You want to find all the program units invoking the ACCOUNT_TRANSACTION procedure. How can you find this information?
A: Query the USER_SOURCE data dictionary view.
B: Query the USER_PROCEDURES data dictionary view.
C: Query the USER_DEPENDENCIES data dictionary view.
D: Set the SQL*Plus environment variable TRACECODE=TRUE and run the ACCOUNT_TRANSACTION procedure.
E: Set the SQL*Plus environment variable DEPENDENCIES=TRUE and run the ACCOUNT_TRANSACTION procedure.
Answer: C

5. Given a function CALCTAX::
CREATE OR REPLACE FUNCTION calctax (sal NUMBER) RETURN NUMBER
IS
BEGIN
RETURN (sal * 0.05);
END;
If you want to run the above function from the SQL*Plus prompt, which statement is true?
A: You need to execute the command
CALCTAX(1000);.
B: You need to execute the command
EXECUTE FUNCTION calctax;.
C: You need to create a SQL*Plus environment variable X and issue the command
:X := CALCTAX(1000);.
D: You need to create a SQL*Plus environment variable X and issue the command
EXECUTE:X := CALCTAX;.
E: You need to create a SQL*Plus environment variable X and issue the command
EXECUTE:X := CALCTAX(1000);
Answer: E

6. Examine the code:
CREATE OR REPLACE PROCEDURE manage_emp (p_eno NUMBER)
IS
v_sal emp.sal%TYPE;
v_job emp.job%TYPE;
BEGIN
SELECT sal, job
INTO v_sal, v_job
FROM emp
WHERE empno = p_eno;
IF (v_sal < 1000) THEN
DBMS_OUTPUT.PUT_LINE ('Delete employees who earn less than $1000');
DELETE FROM emp
WHERE empno = p_eno;
ELSE
DBMS_OUTPUT.PUT_LINE ('Updating employee salaries.');
UPDATE emp
SET sal = sal + 100
WHERE empno = p_eno;
END IF;
END;
What privileges do you need in order to invoke this procedure?
A: No privileges are required.
B: EXECUTE privilege on the procedure
C: EXECUTE privilege on the DBMS_OUTPUT package
D: DELETE and UPDATE privileges on the table EMP
E: EXECUTE privilege on the procedure, and DELETE and UPDATE privileges on the table EMP
Answer: B

7. You have a row level BEFORE UPDATE trigger on the EMP table. This trigger contains a SELECT statement on the EMP table to ensure that the new salary value falls within the minimum and maximum salary for a given job title. What happens when you try to update a salary value in the EMP table?
A: The trigger fires successfully.
B: The trigger fails because it needs to be a row level AFTER UPDATE trigger.
C: The trigger fails because a SELECT statement on the table being updated is not allowed.
D: The trigger fails because you cannot use the minimum and maximum functions in a BEFORE UPDATE trigger.
Answer: C

8. Which part of a database trigger determines the number of times the trigger body executes?
A: trigger type
B: trigger body
C: trigger event
D: trigger timing
Answer: A

9. Examine this package:
CREATE OR REPLACE PACKAGE BB_PACK
IS
V_MAX_TEAM_SALARY NUMBER(12,2);
PROCEDURE ADD_PLAYER(V_ID IN NUMBER, V_LAST_NAME VARCHAR2, V_SALARY NUMBER);
END BB_PACK;
/
CREATE OR REPLACE PACKAGE BODY BB_PACK
IS
V_PLAYER_AVG NUMBER(4,3);
PROCEDURE UPD_PLAYER_STAT
(V_ID IN NUMBER, V_AB IN NUMBER DEFAULT 4, V_HITS IN NUMBER)
IS
BEGIN
UPDATE PLAYER_BAT_STAT
SET AT_BATS = AT_BATS + V_AB,
HITS = HITS + V_HITS
WHERE PLAYER_ID = V_ID;
COMMIT;
VALIDATE_PLAYER_STAT(V_ID);
END UPD_PLAYER_STAT;
PROCEDURE ADD_PLAYER
(V_ID IN NUMBER, V_LAST_NAME VARCHAR2, V_SALARY NUMBER)
IS
BEGIN
INSERT INTO PLAYER(ID,LAST_NAME,SALARY)
VALUES (V_ID, V_LAST_NAME, V_SALARY);
UPD_PLAYER_STAT(V_ID,0,0);
END ADD_PLAYER;
END BB_PACK;
/
Which statement will successfully assign .333 to the V_PLAYER_AVG variable from a procedure outside the package?
A: V_PLAYER_AVG := .333;
B: BB_PACK.UPD_PLAYER_STAT.V_PLAYER_AVG := .333;
C: BB_PACK.V_PLAYER_AVG := .333;
D: This variable cannot be assigned a value from outside of the package.
Answer: D

10. What happens during the parse phase with dynamic SQL?
A: The rows are selected and ordered.
B: The number of rows processed is returned.
C: The validity of the SQL statement is established.
D: An area of memory is established to process the SQL statement.
E: The area of memory established to process the SQL statement is released.
Answer: C


© 2014 Cheat-Test.com, All Rights Reserved