Study Guides and Actual Real Exam Questions For Oracle OCP, MCSE, MCSA, CCNA, CompTIA


Advertise

Submit Braindumps

Forum

Tell A Friend

    Contact Us

 Home

 Search

Latest Brain Dumps

 BrainDump List

 Certifications Dumps

 Microsoft

 CompTIA

 Oracle

  Cisco
  CIW
  Novell
  Linux
  Sun
  Certs Notes
  How-Tos & Practices 
  Free Online Demos
  Free Online Quizzes
  Free Study Guides
  Free Online Sims
  Material Submission
  Test Vouchers
  Users Submissions
  Site Links
  Submit Site

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Online Training Demos and Learning Tutorials for Windows XP, 2000, 2003.

 

 

 

 





Braindumps for "1Z0-101" Exam

Develop PL/SQL Program Units

 Question 1.
Examine this procedure:
CREATE OR REPLACE PROCEDURE update_employee
	(v_emp_id IN NUMBER)
IS
	v_comm NUMBER;
	PROCEDURE calc_comm
	IS
	v_total NUMBER;
	BEGIN
		SELECT SUM(ord.total)
		INTO v_total
		FROM ord,customer
		WHERE ord.custid = customer.custid
		AND customer.repid = v_emp_id;
		v_comm := v_total * .20;
	END calc_comm;
	v_percentage NUMBER;
BEGIN
	SELECT percentage
	INTO v_percentage
	FROM daily_figures
	WHERE TRUNC(figure_date) = TRUNC(SYSDATE);
	IF v_percentage > 33 THEN
		calc_comm;
	END IF;
END;

Why does this code cause an error when compiled?

A.	The SUBPROGRAM keyword does not exist.
B.	CALC_COMM must be invoked using the EXECUTE command.
C.	CALC_COMM must be declared after all local variable declarations.
D.	CALC_COMM must be declared before all local variable declaration.

Answer:  C

Explanation:
Subprograms must be declared after all local variables.

CREATE OR REPLACE PROCEDURE update_employee
(v_emp_id IN NUMBER)
IS
	v_comm   NUMBER;
	v_percentage NUMBER;
	PROCEDURE calc_comm
	IS
		v_total NUMBER;
	BEGIN
		SELECT SUM (ord.total)
		  INTO v_total
		  FROM ord,customer
		  WHERE ord.custid = customer.custid
		  AND   customer.repid = v_emp_id;
		  v_comm := v_tota * .20;
	END calc_comm;
BEGIN
	SELECT percentage
	INTO  v_percentage
	FROM daily_figures
	WHERE TRUNC(figure_date) = TRUNC(SYSDATE);

	IF v_percentage > 33 THEN
		calc_comm
	END IF;

END;

Question 2.
In order for you to create run a package MAINTAIN_DATA which privilege do you need?

A.	EXECUTE privilege on the MAINTAIN_DATA package.
B.	INVOKE privilege on the MAINTAIN_DATA package.
C.	EXECUTE privilege on the program units in the MAINTAIN_DATA package.
D.	Object privilege on all of the objects that the MAINTAIN_DATA package is accessing.
E.	Execute privilege on the program units inside the MAINTAIN_DATA package and execute privilege on the MAINTAIN_DATA package.

Answer:   A

Question 3.
You have created a script file EMP_PROC.SQL that holds the text to create a procedure PROCESS_EMP. You have compiled the procedure for SQL Plus environment by running the script file EMP_PROC.SQL. What happens if there are syntax errors in the procedure PROCESS_EMP?

A.	The errors are stored in the EMP_PROC.ERR file.
B.	The errors are displayed to the screen when the script file is run.
C.	The errors are stored in the procedure_errors data dictionary view.
D.	YOU need to issue the SHOWERRORS command in the SQL Plus environment to see the errors.
E.	YOU need to issue the display errors command in the SQL Plus environment to see the errors.

Answer:   D

Question 4.
Which statement about the local dependent object is TRUE?

A. They are on different nodes.
B. They are in a different database.
C. They are on the same node in the same database.
D. They are on the same node in a different database.

Answer:   C

Question 5.
You need to create a stored procedure, which deletes rows from a table. The name of the table from which the rows are to be deleted is unknown until run time.

Which method do you implement while creating such a procedure?

A.	Use SQL command delete in the procedure to delete the rows.
B.	Use DBMS_SQL packaged routines in the procedure to delete the rows.
C.	Use DBMS_DML packaged routines in the procedure to delete the rows.
D.	Use DBMSDELETE packaged routines in the procedure to delete the rows.
E.	You cannot have a delete statement without providing a table name before compile time.

Answer:   B

Question 6.
Under which situation do you create a server side procedure?

A.	When the procedure contains no SQL statements.
B.	When the procedure contains no PL/SQL commands.
C.	When the procedure needs to be used by many client applications accessing several remote databases.
D.	When the procedure needs to be used by many users accessing the same schema objects on a local database.

Answer:   D

Question 7.
Examine this procedure 

CREATE OR REPLACE PROCEDURE ADD_PLAYER 
(V_ID IN NUMBER, V_LAST_NAME VARCHER2) 
IS 
BEGIN 
INSERT INTO PLAYER(ID,LAST_NAME). 
VALUES(V_ID,V_LAST_NAME); 
COMMIT; 
END; 

This procedure must invoke the UPD-STAT procedure and pass a parameter. 
Which statement will successfully invoke this procedure?

A. EXECUTE UPD_BAT_STAT(V_ID);
B. UPD_BAT_STAT(V_ID);
C. RUN UPD_BAT_STAT(V_ID);
D. START UPD_BAT_STAT(V_ID);

Answer:   B

Question 8.
Examine this function
CREATE OR REPLACE FUNCTION CALC_PLAYER_AVG
(V_ID in PLAYER_BAT_STAT. PLAYER_ID%TYPE)
RETURN NUMBER
IS
V_AVG NUMBER;
SELECTS HITS/AT_BATS
INTO V_AVG
FROM PLAYER_BAT_STAT
WHERE PLAYER_ID_V_ID;
RETURN(V_AVG);
END;

This function must be moved to a package. Which additional statement must be added to the function to allow you to continue using the function in the group by the clause of a select statement?

A.	PRAGMA RESTRICT_REFERENCES (CALC_PLAYER_AVG, WNDS, WNPS);
B.	PRAGMA RESTRICT_REFERENCES (CALC_PLAYER_AVG, WNPS);
C.	PRAGMA RESTRICT_REFERENCES (CALC_PLAYER_AVG, RNPS, WNPS);
D.	PRAGMA RESTRICT_REFERENCES (CALC_PLAYER_AVG, ALLOW_GROUP_BY);

Answer:   A

Question 9.
Examine this procedure:

CREATE OR REPLACE PROCEDURE find_cpt
	(v_movie_id {argument mode} NUMBER, v_cost_per_ticket {argument mode}
NUMBER)
IS
BEGIN
	IF v_cost_per_ticket > 8.50 THEN
		SELECT cost_per_ticket
		INTO v_cost_per_ticket
		FROM gross _receipt
		WHERE movie_id = v_movie_id;
	END IF;
END;

Which argument mode should be used for V_MOVIE_ID?

A.	IN
B.	OUT
C.	IN OUT
D.	IN RETURN

Answer:   A

Explanation:
The value of V_MOVIE_ID is used in the WHERE clause to determine which row to return. Since it is only being read and not modified, it should be declared as an IN argument.

Question 10.
Which statement about procedure is true?

A.	They promote reusability and maintainability.
B.	They add functionality to SQL DML statements.
C.	They perform actions and always return a value.
D.	They add functionality to SQL SELECT statements.

Answer:   A

Explanation:
Procedure usually contains code that is executed from more than one application. Storing code in one location makes it ideally suitable for reusability and maintainability.

Procedures cannot be used in SQL statements and do not have to return a value.

Question 11.
The MODIFY_PAYROLL procedure contains many SQL statements and will be executed from multiple client applications. Where should this procedure be stored?

A.	server only
B.	system global area
C.	client applications only 
D.	server and client applications

Answer:  A

Explanation: 
A procedure that contains multiple SQL statements should be stored on the server to dramatically reduce the amount of network traffic when executed from a client machine.

If the procedure is stored in an Oracle Developer application, each SQL statement must be sent separately to the server to be processed. If the procedure is stored on the server, the application simply execute it with one call.

Question 12.
When invoking a procedure you can specify the arguments using the positional method by listing the values in the order of the argument list. Which method would you use to list values in an arbitrary order?

A.	FIFO
B.	List
C.	Type
D.	Named

Answer:  D

Explanation: 
You can specify argument values using the positional or named method. The named method requires the use of the “=>” operator to specify a value for each argument and allows for an arbitrary assignment of values.

The named method:
EXECUTE find_seats_sold (v_theater_id => 500, v_movie_id => 34);

The positional method:
EXECUTE find_seats_sold (500, 34);

The value of 500 is assigned to the first argument listed in the procedure header and 34 is assigned to the second argument.

Question 13.
The UPDATE_EMPLOYEE procedure contains an algorithm that calculates an employee’s commission multiple times throughout the program. If a change is made to the algorithm, the change must be made multiple times. How can this procedure be modified to simplify the code and reduce duplicated code?

A.	Add an algorithm exception handler.
B.	Create a library containing the algorithm.
C.	Add a local subprogram containing the algorithm.
D.	Create multiple anonymous blocks containing the alogrithm.

Answer:  C

Explanation:
Subprograms allow you to create just one occurrence of a piece of code that must be executed in different locations of a procedure.

Use local subprograms when the code is only executed within the procedure. If the code will be executed from outside the procedure, then the subprogram should be written as a packaged or stand-alone procedure instead.

Example: (calc_comm is the subprogram)

CREATE OR REPLACE PROCEDURE update_employee
	(v_emp_id IN NUMBER)
IS
	v_comm NUMBER;

	PROCEDURE calc_comm
	IS
		v_total NUMBER;
	BEGINS
		SELECT SUM(ord.total)
		INTO v_total
		FROM ord,customer
		WHERE ord.custid = customer.custid
		AND customer.repid = v_emp_id;
		V_comm := v_total * .20;
	END calc_comm;

BEGIN
	…
	calc_comm;
	…
	calc_comm;
	…
	calc_comm;
END;

Question 14.
You have just successfully dropped the CALC_COMM procedure and deleted the script file containing the source code. Which command can you execute to recover this procedure?

A.	ROLLBACK;
B.	ROLLBACK TO PROCEDURE calc_comm;
C.	ALTER PROCEDURE calc_comm COMPILE;
D.	Only the database administrator can recover this procedure using backups.

Answer:   D

Explanation:
The DROP PROCEDURE command is a DDL command and is therefore, auto-committing. A committed Transaction cannot be rolled back. Without a script file containing the source code, only the DBA can recover this procedure.

Question 15.
Examine this procedure:

CREATE OR REPLACE PROCEDURE find_seats_sold
	(v_movie_id IN NUMBER)
IS
	v_seats_sold    gross_receipt.seats_sold%TYPE;
BEGIN
	SELECT seats_sold
	INTO v_seats_sold
	FROM gross_receipt
	WHERE movie_id = v_movie_id;
END;

The value of V_SEATS_SOLD must be returned to the calling environment. Which change should you make to the code.

A.	Declare V_SEATS_SOLD as an OUT argument.
B.	Declare V_SEATS_SOLD as a RETURN argument.
C.	Add RETURN V_SEATS_SOLD immediately before the IS keyword.
D.	Add RETURN V_SEATS_SOLD immediately before the END keyword.

Answer:  A

Explanation:
Procedure can return values to the calling environment using OUT arguments. Arguments are declared after the IS keyword and before the BEGIN keyword.
The procedure after adding the OUT argument:
CREATE OR REPLACE PROCEDURE find_seats_sold
	(v_movie_id IN NUMBER, v_seats_sold OUT NUMBER)
IS
	v_seats_sold gross_receipt.seats_sold%TYPE;
BEGIN
	SELECT seats_sold
	INTO v_seats_sold
	FROM gross_receipt
	WHERE MOVIE_ID = v_movie_id;
END;


Google
 
Web www.certsbraindumps.com


Braindumps: Dumps for 220-701 Exam Brain Dump

Study Guides and Actual Real Exam Questions For Oracle OCP, MCSE, MCSA, CCNA, CompTIA


Advertise

Submit Braindumps

Forum

Tell A Friend

    Contact Us





Braindumps for "220-701" Exam

CompTIA A+ Essentials

 Question 1.
Which of the following types of portable media offers the LARGEST storage capacity?

A. DVD.DL
B. CD.RW
C. CD.R
D. DVD.R

Answer: A

Question 2.
Which of the following are valid ports for printing over a network? (Select TWO).

A. USB 001
B. \\computername\sharename
C. SNMP
D. IP_ip_address
E. IEEE 1394

Answer: B, D

Explanation:
\\computername\sharename is a net command that manages network print jobs and IP_ip_address is a static IP address that is configured on a network printer so that it can be seen on the network by a computer. This address can be verified from printer's configuration.

Question 3.
While performing a preventative maintenance check on a personal computer, a technician notices that several unused expansion card slots have open ports. 

Which of the following BEST describes why the covers for these card slots should be reinstalled?

A. Help limit radio frequency interference (RFI) inside the case.
B. Help ensure proper air flow through the case.
C. Help prevent moisture buildup in the case.
D. Help limit electrostatic discharge (ESD) inside the case.

Answer: B

Explanation:
The chassis of a PC is designed for proper internal airflow across the various components. However, if your PC's enclosures are open, then the cooling of the PC changes dramatically. The cooling of some components can be reduced or totally eliminated and can cause damage.

Question 4.
Which of the following protocols uses port 80?

A. SMTP
B. HTTP
C. HTTPS
D. FTP

Answer: B

Explanation:
The port 80 is associated with HTTP TCP/IP protocol.

Question 5.
Which of the following allows verification of the port that a printer is currently using?

A. The print queue window from system tray
B. Properties of the printer from the Printers Control Panel
C. Print spooler view in the Printers Control Panel
D. Properties of the port within Device Manager

Answer: B

Explanation:
To find the port that your printer is currently using, you need to open the properties of the printer from the Printer's Control Panel

Question 6.
Users are reporting that print jobs being sent to a shared printer are not printing. A technician has verified the printer is online and prints a configuration page from the printer. 

Which of the following is the MOST likely cause of the issue? (Select TWO).

A. QoS for printing is not functioning over the LAN.
B. The printer needs to have a cartridge replaced.
C. A job in error status is at the top of the print queue.
D. The printers IP address has changed.
E. New drivers have been released and need to be installed.

Answer: C, D

Explanation:
The possible cause of the problem in this case is that either a job in error status is at the top of the print queue or the IP address of the printer has changed. Sometimes, certain print codes in the file that is printing can confuse the print job and the job gets stuck in the print queue. The printer would not start printing again till that print job is removed from the queue. Sometime if the IP address of the printer is changed you cannot print. To find this problem you can ping the printer from your computer.

Question 7.
Which of the following connector types is used with twisted pair cable?

A. T-Connector
B. BNC
C. RJ-45
D. LC

Answer: C

Explanation:
With twisted pair cable you can use RJ-45 connector. The UTP ( unshilded twisted pair) cable often is installed using a Registered Jack 45 (RJ-45) connector. The RJ-45 is an eight-wire connector used commonly to connect computers onto a local-area network (LAN), especially Ethernets

Question 8.
Which of the following bus speeds is used for a PCIe card? (Select TWO).

A. 1x
B. 3x
C. 6x
D. 8x
E. 24x

Answer: A, D

Explanation:
For a PCIe or PCI expansion card, 1x and 8x bus speeds can be used.

Question 9.
A user calls and says they cannot get to the Internet. How would a technician walk the user through checking the IP address and default Gateway on the computer?

A. Start>Run>typeipconfig>click OK and ask user to read the results.
B. Start>Run>typecmd>click OK>type ipconfig /flushdns>press enter and ask user to read the 
    results.
C. Start>Run>typecmd>click OK>type ipconfig /release>press enter key and ask user to read the 
    results.
D. Start>Run>typecmd>click OK>type ipconfig /all>press enter key and ask user to read the   
    results.

Answer: D

Explanation:
The Ipconfig command is used to find the IP configuration information of a computer. The Syntax IPCONFIG /all displays full configuration information. You can type the Ipconfig command by clicking Start->Run and then typing cmd to open the command prompt to type the ipconfig command.

Question 10.
Which of the following BEST describes the function of a DNS server?

A. Secures network traffic through shared key encryption.
B. Provides resolution of host names to IP addresses.
C. Provides security for a network through the use of ACLs.
D. Dynamically assigns IP addresses for easy client configuration.

Answer: B

Explanation:
The main function of DNS is the mapping of IP addresses to human readable names. The DNS server strictly functions as an ip address lookup for a given domain name.



Google
 
Web www.certsbraindumps.com


Study Guides and Real Exam Questions For Oracle OCP, MCSE, MCSA, CCNA, CompTIA





              Privacy Policy                   Disclaimer                    Feedback                    Term & Conditions

www.helpline4IT.com

ITCertKeys.com

Copyright © 2004 CertsBraindumps.com Inc. All rights reserved.