Vous êtes sur la page 1sur 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

Question: 1 An SQL procedure uses the statement shown below to insert a record into a global temporary table named TEMP_TABLE INSERT INTO temp_table VALUES (1, 'a') Which schema name should be used to qualify the temporary table in the INSERT statement? A. SESSION B. DB2ADMIN C. DB2USER D. SYSIBM Answer: A Question: 2 Which two DB2 commands can be performed using the ADMIN_CM rocedure? (Choose two.) A. RUNSTATS B. BACKUP C. RESTORE D. RECOVER E. CREATE DATABASE Answer: A, B Question: 3 Which statement describes what must be done to create an SQL procedure that returns a result set? A. Specify the clause DYNAMIC RESULT SETS 1 in the CREATE PROCEDURE statement; declare a cursor within the procedure body; open the cursor; exit the procedure without closing the cursor. B. Specify the clause DYNAMIC RESULT SETS 1 in the CREATE PROCEDURE statement; code a SELECT statement in the procedure body. C. Execute the CREATE PROCEDURE statement using the defaults; declare a cursor within the procedure body; open the cursor; exit the procedure without closing the cursor. D. Execute the CREATE PROCEDURE statement using the defaults; declare a cursor within the procedure body; open the cursor; retrieve each row into output variables; close the cursor before exiting the procedure. Answer: A Question: 4 A database developer using Data Studio needs to view sample data in a table. Which view should be used? A. Database Explorer B. Data Project Explorer C. Data Output D. Properties Answer: A Question: 5 Given the function shown below, what is the output of the statement: VALUES LENGTH(fcn1(' one good day '))? CREATE FUNCTION fcn1(v1 VARCHAR(50))
Page 1 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

RETURNS VARCHAR(50) RETURN LTRIM(RTRIM(v1)); A. 'one good day' B. 12 C. ' one good day ' D. 14 Answer: B Question: 6 Which statement can be used to declare a variable inside an SQL procedure that can be used to represent a monetary value? A. DECLARE v_money MONEY; B. DECLARE v_money DOUBLE; C. DECLARE v_money DECIMAL(9,2); D. DECLARE v_money CURRENCY; Answer: C Question: 7 Click the Exhibit button.

A user-defined function was created using the statement shown in the exhibit. Which additional option can be added to the CREATE FUNCTION statement to tell the optimizer that function does not always return the same results for a given argument value?

A. NO EXTERNAL ACTION B. NOT FENCED C. NOT DETERMINISTIC D. STATIC DISPATCH


Page 2 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

Answer: C Question: 8 In which type of table space must global temporary tables be created? A. REGULAR B. LONG C. SYSTEM TEMPORARY D. USER TEMPORARY Answer: D Question: 9 Which statement should be used to declare an array with at most 10 elements of type INTEGER? A. DECLARE sub_total INTEGER[10]; B. DECLARE sub_total[10] INTEGER; C. CREATE TYPE sub_total AS INTEGER[10]; D. CREATE TYPE sub_total[10] AS INTEGER; Answer: C Question: 10 Click the Exhibit button. A developer attempted to create a procedure to determine the oldest employee celebrating a birthday in a particular month by executing the SQL statement shown in the exhibit. Tests show the procedure does not work as planned. What are two ways to make the procedure work as intended? (Choose two.)

Page 3 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. Add the statement LSE RETURN; before the statement AND IF; B. Change the statement ALSEIF UCASE(b_month) != UCASE(month) THEN to ALSEIF UCASE(b_month) = UCASE(month) THEN C. Add the statement ALSE BREAK; before the statement AND IF; D. Change the statement ALSEIF UCASE(b_month) != UCASE(month) THEN ITERATE this_loop; to ALSEIF UCASE(b_month) = UCASE(month) THEN LEAVE this_loop;? E. Add the statement ALSE CONTINUE; before the statement AND IF; Answer: A, D

Question: 11 Click the Exhibit button. How many rows will be in table INFO2 after the procedure MOVE_DATA shown in the exhibit is executed?

Page 4 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. 0 B. 4 C. 5 D. 7 Answer: B Question: 12 Click the Exhibit button. Referring to the exhibit, how many rows will be returned by the SQL query shown below? SELECT * FROM TABLE(getnumemployee(21) AS d

Page 5 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. 0 B. 1 C. 7 D. 10 Answer: C

Question: 13 Which two statements are true when working with triggers? (Choose two.) A. Triggers can be used to enforce data integrity rules.
Page 6 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

B. Triggers can be used with both tables and views. C. Triggers can be altered. D. Triggers can be used on Materialized Query Tables. E. Triggers can be defined using Java or C. Answer: A, B.

Question: 14 Click the Exhibit button.

If the three procedures were built as shown in the exhibit, what will take place if an application invokes SQL procedure PROCMAIN? A. 0 result sets are returned. B. 1 result set is returned. C. 1 result set is returned with a warning. D. 2 result sets are returned with a warning. Answer: B Question: 15 Which SQL procedure declaration is valid? A. CREATE PROCEDURE myproc(IN multp INTEGER, OUT p_code INTEGER) BEGIN DECLARE SQLSTATE CHAR(5); DECLARE a INTEGER; DECLARE c_duplicate CONDITION FOR SQLSTATE '23505';
Page 7 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

DECLARE my_cur CURSOR FOR SELECT * FROM employee; DECLARE EXIT HANDLER FOR SQLEXCEPTION SET p_code = 0; SET a = a * multp; DECLARE b INTEGER; b = a *1.7; SET p_code = b; END B. CREATE PROCEDURE myproc(IN multp INTEGER, OUT p_code INTEGER) BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION SET p_code = 0; DECLARE SQLSTATE CHAR(5); DECLARE a INTEGER; DECLARE c_duplicate CONDITION FOR SQLSTATE '23505'; DECLARE my_cur CURSOR FOR SELECT * FROM employee; SET a = a * multp; SET p_code = a; END C. CREATE PROCEDURE myproc(IN multp INTEGER, OUT p_code INTEGER) BEGIN DECLARE SQLSTATE CHAR(5); DECLARE a INTEGER; DECLARE my_cur CURSOR FOR SELECT * FROM employee; DECLARE c_duplicate CONDITION FOR SQLSTATE '23505'; DECLARE EXIT HANDLER FOR SQLEXCEPTION SET p_code = 0; SET a = a * multp; SET p_code = a; END D. CREATE PROCEDURE myproc(IN multp INTEGER, OUT p_code INTEGER) BEGIN DECLARE SQLSTATE CHAR(5); DECLARE a INTEGER; DECLARE c_duplicate CONDITION FOR SQLSTATE '23505'; DECLARE my_cur CURSOR FOR SELECT * FROM employee; DECLARE EXIT HANDLER FOR SQLEXCEPTION SET p_code = 0; SET a = a * multp; SET p_code = a; END Answer: D Question: 16 Which statement will assign the schema names "SYSIBM", "SYSFUN", "SYSPROC", and "SYSIBMADM" to the CURRENT_PATH special register? A. SET PATH = SYSTEM PATH B. SET CURRENT_PATH = DEFAULT C. SET PATH = SYSTEM DEFAULT
Page 8 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

D. RESET CURRENT PATH Answer: A Question: 17 There is no row change timestamp column defined on a table. An original row is selected, another row is updated on the same page after the SELECT and before the UPDATE. With Optimistic A. The row change token predicate succeeds for the selected row because the row change token value for all rows on the page has changed except for the original row, so the UPDATE statement succeeds for the original row. B. The row change token predicate fails because the row change token value for all rows on the page has changed, however the UPDATE statement succeeds since the original row has not actually changed. C. The row change token predicate fails because the row change token value for all rows on the age has changed, so the UPDATE statement fails to find a row even though the original row has not actually changed. D. The row change token predicate is implicitly updated because the row change token value for all rows on the page has changed, so the UPDATE statement fails to find a row even though the original row has not actually changed. Answer: C Question: 18 Which three statements are true about SQL procedures? (Choose three.) A. SQL procedures reside outside of the database for easy portability. B. SQL procedures can be called from triggers. C. SQL procedures may return multiple result sets to the caller or to a client application. D. SQL procedures support recursion. E. SQL procedures support the PRINT statement. Answer: B, C, D Question: 19 Which statement will successfully create an SQL procedure that returns the name of the current month? A. CREATE PROCEDURE proc.current_month(OUT month VARCHAR(20)) BEGIN DECLARE today DATE; SET (today = CURRENT_DATE); SET month = MONTHNAME(today); END B. CREATE PROCEDURE proc.current_month(OUT month VARCHAR(20)) BEGIN DECLARE today DATE; SELECT (CURRENT_DATE) INTO today; SET month = MONTHNAME(today); END C. CREATE PROCEDURE proc.current_month(OUT month VARCHAR(20)) BEGIN DECLARE today DATE;
Page 9 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

VALUES (CURRENT_DATE) INTO today; SET month = MONTHNAME(today); END D. CREATE PROCEDURE proc.current_month(OUT month VARCHAR(20)) BEGIN SET month = MONTHNAME(SELECT (CURRENT_DATE)) END Answer: C Question: 20 Click on the Exhibit button.

Referring to the exhibit, what is the OUT_PHONENUMBERS result set when the SQL procedure is invoked by the call statement shown below? CALL find_customers(ARRAY[16-305-3745 05-414-4565 16-305-3746 '905-414-4566'], 16 )

A. [?16-305-3745??05-414-4565? ?16-305-3746'] B. [?16-305-3745??05-414-4565? ?16-305-3746? '905-414-4566'] C. [?05-414-4565? '905-414-4566'] D. [?16-305-3745? ?16-305-3746[?16-305-3745? ?16-305-3746? Answer: D
Page 10 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

Question: 21 Click the Exhibit button. Which statement correctly describes the result of the FOR loop shown in the exhibit?

A. FULLNAME is set to the last name of the employee, followed by a comma, the first name, a blank space, and the middle initial. Only the last value for FULLNAME is inserted into table TNAMES. B. FULLNAME is set to the last name of the employee, followed by a comma, the first name, a blank space, and the middle initial. Only the first value for FULLNAME is inserted into table TNAMES. C. FULLNAME is set to the last name of the employee, followed by a comma, the first name, a blank space, and the middle initial for each row. Each value for FULLNAME is inserted into tabl TNAMES in alphabetical order. D. FULLNAME is set to the last name of the employee, followed by a comma, the first name, a blank space, and the middle initial for each row. Each value for FULLNAME is inserted into table TNAMES. Answer: D Question: 22 Given the statements shown below: DECLARE c_dept CURSOR WITH HOLD FOR SELECT * FROM dept; OPEN c_dept; Which two conditions are true? (Choose two.)A. C_DEPT will remain open after a ROLLBACK. B. C_DEPT will remain open after a COMMIT. C. C_DEPT will be returned to the caller of the routine. D. C_DEPT will be positioned before the next logical row. E. All locks held by C_DEPT will be released after a COMMIT.

Page 11 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

Answer: B, D Question: 23 Which two return types can be used in the RETURN clause of the CREATE FUNCTION statement? (Choose two.) A. VARCHAR(10) B. TABLE C. RECORD D. XML E. ARRAY Answer: A, B Question: 24 Which two statements are true with regards to nesting SQL procedures? (Choose two.) A. An SQL procedure cannot invoke procedures built in other languages (e.g., C, Java). B. An SQL procedure can invoke the same SQL procedure more than once. C. An SQL procedure defined with the CONTAINS SQL clause can invoke an SQL procedure defined with the READS SQL DATA clause. D. An SQL procedure defined with the CONTAINS SQL clause can invoke an SQL procedure defined with the MODIFIES SQL DATA clause. E. An SQL procedure defined with the CONTAINS SQL clause can invoke an SQL procedure defined with the NO SQL clause. Answer: B, E Question: 25 There is no row change timestamp column defined on a table. An original row is selected, another row is updated on the same page after the SELECT and before the UPDATE. With Optimistic Locking, what is the result? A. The row change token predicate succeeds for the selected row because the row change token value for all rows on the page has changed except for the original row, so the UPDATE statement succeeds for the original row. B. The row change token predicate fails because the row change token value for all rows on the page has changed, however the UPDATE statement succeeds since the original row has not actually changed. C. The row change token predicate fails because the row change token value for all rows on the page has changed, so the UPDATE statement fails to find a row even though the original row has not actually changed. D. The row change token predicate is implicitly updated because the row change token value for all rows on the page has changed, so the UPDATE statement fails to find a row even though the original row has not actually changed. Answer: C Question: 26 Click the Exhibit button. Given the two SQL procedures shown in the exhibit, what is the expected output if procedure S1 is invoked with the value 1 provided for parameter V1

Page 12 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. NULL B. 2 C. 5 D. 7 Answer: D Question: 27 Click on the Exhibit button. Referring to the exhibit, what is the OUT_PHONENUMBERS result set when the SQL procedure is invoked by the call statement shown below? CALL find_customers(ARRAY[16-305-3745 05-414-4565 16-305-3746 '905-414-4566'], 16)

Page 13 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. [?16-305-3745??05-414-4565? ?16-305-3746'] B. [?16-305-3745??05-414-4565? ?16-305-3746? '905-414-4566'] C. [?05-414-4565? '905-414-4566'] D. [?16-305-3745? ?16-305-3746[?16-305-3745? ?16-305-3746? Answer: D Question: 28 Click the Exhibit button. How many distinct rows would be in table T1 if the statements in the exhibit were executed?

Page 14 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. 3 B. 7 C. 9 D. 10 Answer: B Question:29 An independent software vendor (ISV) uses proprietary and confidential logic in their SQL procedure bodies and does not want their customers to be able to view their contents. Which statement correctly describes how the ISV can protect their code when they deploy it at customer sites? A. Use the PUT_ROUTINE() and GET_ROUTINE() SQL procedures. B. Enable obfuscation using the DB2_SQLROUTINE_PREPOPTS DB2 registry variable. C. Use the ENCRYPT_ROUTINE() and DECRYPT_ROUTINE() SQL procedures. D. There is no way to obfuscate SQL procedure logic. Answer: A Question: 30 Given the SQL statement shown below: CREATE TRIGGER hr.raise_limit AFTER UPDATE OF salary ON employee REFERENCING NEW AS n OLD AS o FOR EACH ROW WHEN (n.salary > 1.1 * o.salary) SIGNAL SQLSTATE '75000' SET MESSAGE_TEXT='Salary increase>10%' Which two privileges allow a user to execute the CREATE TRIGGER statement shown? (Choose two.) A. DBADM authority B. SYSCTRL authority C. SELECT and UPDATE privilege on the EMPLOYEE table D. SYSMAINT authority E. SELECT and ALTER privilege on the EMPLOYEE table
Page 15 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

Answer: A, C Question: 31 Which statement can be used to define an array of 30 names that have a maximum size of 25 characters each? A. CREATE TYPE names AS VARCHAR(25) ARRAY[30]; B. CREATE ARRAY names[30] VARCHAR(25); C. CREATE TYPE names[30] VARCHAR(25); D. CREATE ARRAY names AS VARCHAR(25); Answer: A Question: 32 Which two belong within a compound statement? (Choose two.) A. connect statement B. flow statement C. condition declaration D. function declaration E. cursor declaration Answer: C, E Question: 33 A developer needs to create a user-defined function that will return a list of employees who work in a particular department. Which statement will successfully create a function that meets this objective? A. CREATE FUNCTION dept_employees (deptno CHAR(3)) RETURNS TABLE LANGUAGE SQL READS SQL DATA RETURN SELECT empno, lastname AS l_name, firstnme AS f_name FROM employee WHERE employee.workdept = dept_employees.deptno B. CREATE FUNCTION dept_employees (deptno CHAR(3)) RETURNS TABLE DYNAMIC RESULT SETS 1 LANGUAGE SQL READS SQL DATA DECLARE emp_info CURSOR WITH RETURN FOR SELECT empno, lastname AS l_name, firstnme AS f_name FROM employee WHERE employee.workdept = dept_employees.deptno OPEN emp_info; RETURN C. CREATE FUNCTION dept_employees (deptno CHAR(3)) RETURNS TABLE (empno CHAR(6), l_name VARCHAR(15), f_name VARCHAR(12)) LANGUAGE SQL READS SQL DATA RETURN
Page 16 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

SELECT empno, lastname AS l_name, firstnme AS f_name FROM employee WHERE employee.workdept = dept_employees.deptno D. CREATE FUNCTION dept_employees (deptno CHAR(3)) RETURNS TABLE (empno CHAR(6), l_name VARCHAR(15), f_name VARCHAR(12)) DYNAMIC RESULT SETS 1 LANGUAGE SQL READS SQL DATA DECLARE emp_info CURSOR WITH RETURN FOR SELECT empno, lastname AS l_name, firstnme AS f_name FROM employee WHERE employee.workdept = dept_employees.deptno OPEN emp_info; RETURN Answer: C Question: 34 Given the statement shown below: CREATE TRIGGER new_hired AFTER INSERT ON employee FOR EACH ROW UPDATE empsumm SET empsumm.no_of_employees = emptest.no_of_employees + 1 Which statement will fire the resulting trigger? A. CALL TRIGGER new_hired('0010') B. INSERT INTO employee VALUES('0010', 'john doe', 30000.00, 50) C. TRIGGER new_hired(employee) D. SELECT TRIGGER new_hired FROM employee Answer: B Question: 35 Which statement is permitted within a scalar user-defined function body? A. COMMIT B. INSERT C. SIGNAL D. LOOP Answer: C Question: 36 What is a reason to use SQL procedures in DB2? A. to use different programming languages B. to reduce code sharing C. to reduce network traffic D. to eliminate the need for testing Answer: C Question: 37
Page 17 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

Using Optimistic Locking, both Transaction 1 and Transaction 2 have read the same row including the RID_BIT and ROW CHANGE TOKEN values. Transaction 1 updates the row after e that same row using the same predicate as transaction 1. What will be the result? A. The row will be found with the same ROW CHANGE TOKEN. Transaction 2 will now insert its values replacing those of transaction 1. B. The row will be found with a different ROW CHANGE TOKEN and Transaction 2 will overwrite the values set in transaction 1. C. The row will not be found because the value of the ROW CHANGE TOKEN has changed in regard to the UPDATE of transaction 1. Transaction 2 has to retry in order to retrieve the current data. D. The row will not be found because the value of the ROW CHANGE TOKEN has changed in regard to the UPDATE of transaction 1. Transaction 2 will complete with an insert of a new row. Answer: C Question: 38 Which three optional clauses can be used when creating an external function? (Choose three.) A. SCRATCHPAD B. NOTEPAD C. LANGUAGE D. EXTERNAL NAME E. DATABASEINFO Answer: A, C, D Question: 39 Which SQL procedure declaration is valid? A. CREATE PROCEDURE myproc(IN multp INTEGER, OUT p_code INTEGER) BEGIN DECLARE SQLSTATE CHAR(5); DECLARE a INTEGER; DECLARE c_duplicate CONDITION FOR SQLSTATE '23505'; DECLARE my_cur CURSOR FOR SELECT * FROM employee; DECLARE EXIT HANDLER FOR SQLEXCEPTION SET p_code = 0; SET a = a * multp; DECLARE b INTEGER; b = a *1.7; SET p_code = b; END B. CREATE PROCEDURE myproc(IN multp INTEGER, OUT p_code INTEGER) BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION SET p_code = 0; DECLARE SQLSTATE CHAR(5); DECLARE a INTEGER; DECLARE c_duplicate CONDITION FOR SQLSTATE '23505'; DECLARE my_cur CURSOR FOR SELECT * FROM employee; SET a = a * multp;
Page 18 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

SET p_code = a; END C. CREATE PROCEDURE myproc(IN multp INTEGER, OUT p_code INTEGER) BEGIN DECLARE SQLSTATE CHAR(5); DECLARE a INTEGER; DECLARE my_cur CURSOR FOR SELECT * FROM employee; DECLARE c_duplicate CONDITION FOR SQLSTATE '23505'; DECLARE EXIT HANDLER FOR SQLEXCEPTION SET p_code = 0; SET a = a * multp; SET p_code = a; END D. CREATE PROCEDURE myproc(IN multp INTEGER, OUT p_code INTEGER) BEGIN DECLARE SQLSTATE CHAR(5); DECLARE a INTEGER; DECLARE c_duplicate CONDITION FOR SQLSTATE '23505'; DECLARE my_cur CURSOR FOR SELECT * FROM employee; DECLARE EXIT HANDLER FOR SQLEXCEPTION SET p_code = 0; SET a = a * multp; SET p_code = a; END Answer: D Question: 40 What will be the initial value of V_MAX in the declaration statement shown below? DECLARE v_max DECIMAL(9,2); A. 0.0 B. 2 C. 9 D. NULL Answer: D Question: 41 How is the FOR statement distinct from other conditional statements? A. FOR statements are evaluated at the completion of each iteration of the loop. B. FOR statements are evaluated before each iteration of the loop. C. FOR statements have a terminating condition clause. D. FOR statements are used to iterate over rows in a defined read-only result set. Answer: D Question: 42 Click the Exhibit button. Refer to the procedure shown in the exhibit and the trigger shown below. CREATE TRIGGER sal_limit BEFORE UPDATE ON employee
Page 19 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

REFERENCING NEW AS n FOR EACH ROW WHEN (n.salary > (SELECT max_salary FROM salary_limits WHERE job_desc = n.job) + gl_sal_increase) SIGNAL SQLSTATE '78000' SET MESSAGE_TEXT = 'Salary is too big'; If the procedure SAL_INCREASE_LIM is called, which two statements are true? (Choose two.)

A. Global variables are not supported within the trigger. B. The result of the procedure will depend on the value of MAX_SALARY in the table SALARY_LIMITS. C. The result of the procedure will depend on the value for HIREDATE column for the employee that is being updated. D. The result of the procedure will depend on the value GL_SAL_INCREASE for the employee that is being updated. E. This trigger would not be activated. Answer: B, C Question: 43 You want to see the explain plan for all SQL statements used in your SQL procedures. Which two statements will allow you to obtain the explain plan? (Choose two.) A. Copy SQL statements from the SQL procedure and paste into the Control Center, Command Editor, or Data Studio explain facility. B. Use the DB2SET command to globally set DB2_SQLROUTINE_PREPOPTS="EXPLAIN YES EXPLSNAP YES" . C. Call SYSPROC.SET_ROUTINE_OPTS('EXPLAIN YES EXPLSNAP YES') to set explain parameters for a session and compile the SQL procedure. Run the db2expl or db2exfmt tool to capture the explain plan.
Page 20 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

D. Call SYSPROC.REBIND_ROUTINE_PACKAGE and specify 'EXPLAIN YES EXPLSNAP YES' bind option. Run the db2expl or db2exfmt tool to capture explain plan. E. Call SYSPROC.SET_ROUTINE_OPTS('EXPLAIN YES EXPLSNAP YES') to set explain parameters for a session and compile the SQL procedure. Answer: A, C Question: 44 Which two statements describe characteristics of external functions? (Choose two.) A. External functions cannot return tables. B. All cursors opened within an external function should stay open until the database is quiesced. C. Dynamic allocations of memory in an external routine should be freed before the external routine returns. D. Scratchpads can be used to allocate dynamic memory required for multiple function invocations. E. Transactions can be terminated within external functions. Answer: C, D Question: 45 Click the Exhibit button. A user-defined function was created using the statement shown in the exhbit. What are two valid ways to invoke this function from the DB2 Command Line Processor? (Choose two.)

A. SELECT lastname, e_degree(edlevel) AS degree FROM employee B. SELECT * FROM e_degree(SMALLINT(18)) C. VALUES e_degree(18) D. VALUES e_degree(SMALLINT(18))
Page 21 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

E. SELECT * FROM TABLE(e_degree(SMALLINT(18)) Answer: A, D Question: 46 Which steps must be followed to return a result set from an SQL procedure? A. 1. Create the procedure using the DYNAMIC RESULT SETS clause. 2. Declare the cursor. 3. Open the cursor in the SQL procedure. 4. Close the cursor. 5. Return to the application. B. 1. Create the procedure using the DYNAMIC RESULT SETS clause. 2. Declare the cursor using the WITH RETURN clause. 3. Open the cursor in the SQL procedure. 4. Return to the application. C. 1. Create the procedure using the WITH RETURN clause. 2. Declare the cursor using the DYNAMIC RESULT SETS clause. 3. Open the cursor in the SQL procedure. 4. Return to the application. D. 1. Create the procedure using the WITH RETURN clause. 2. Declare the cursor using the DYNAMIC RESULT SETS clause. 3. Open the cursor in the SQL procedure. 4. Close the cursor. Answer: B Question: 47 Click the Exhibit button. Which statement can be used to invoke the function in the exhibit?

A. SELECT * FROM TABLE(fcn1('B01')) B. SELECT TABLE(fcn1('B01')) FROM SYSIBM.SYSDUMMY1 C. SELECT * FROM fcn1('B01') D. SELECT fcn1('B01') FROM SYSIBM.SYSDUMMY1 Answer: A Question: 48

Page 22 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

Click the Exhibit button. An SQL procedure was created using the statement shown in the exhibit. What is the correct way to invoke this procedure from the DB2 Command Line Processor?

A. CALL proc.conv_temp(98.6, 'F-C', 0) B. SELECT location, proc.conv_temp(temp, 'F-C', 0) AS temp FROM geo_data C. CALL proc.conv_temp(98.6, 'F-C', 0) D. SELECT location, proc.conv_temp(temp, 'F-C') AS temp FROM geo_data Answer: C Question: 49 Click the Exhibit button. Given that the statements in the exhibits have executed successfully, which solution contains the complete set of commands that could be used to drop both procedures in the order presented?

Page 23 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. DROP PROCEDURE testp; B. DROP PROCEDURE testp; DROP PROCEDURE testproc; C. DROP SPECIFIC PROCEDURE testproc; DROP PROCEDURE testproc; D. DROP PROCEDURE testproc(INT); DROP PROCEDURE testproc(INT); Answer: C Question:50 Which CREATE PROCEDURE statement option should be used if you plan on issuing a DECLARE GLOBAL TEMPORARY TABLE statement from within the SQL procedure body? A. CONTAINS SQL B. READS SQL DATA C. MODIFIES SQL DATA D. LANGUAGE SQL Answer: C Question: 51 Which statement will change the value of a special register? A. UPDATE SPECIAL REGISTER TIME = 2:30:00 B. UPDATE SPECIAL REGISTER SCHEMA = 'DB2ADMIN' C. SET CURRENT TIME = 2:30:00 D. SET CURRENT SCHEMA = 'DB2ADMIN'

Page 24 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

Answer: D Question: 52 Which statement is true for a global temporary table? A. Results from manipulation of the data cannot to be stored temporarily in a table. B. A user temporary table space must exist before global temporary tables can be created. C. The data in the temporary table continues to persist after termination and disconnection from the database. D. Global temporary tables can be created on demand. Answer: B Question: 53 Click the Exhibit button. In the exhibit, the code for an SQL user-defined function is contained in the file func1.db2. What is the correct command to build this function from the command line?

A. db2 d! f dept_salary() B. db2 d! f func1.db2 C. db2 vf func1.db2 D. db2 vf f get_dept_sal Answer: B Question: 54 Which two DB2 privileges are required to issue a CREATE PROCEDURE statement, assuming the SCHEMA name used for the SQL procedure already exists? (Choose two.) A. EXECUTE privilege on any dependent SQL procedures B. BINDADD privilege on the database C. BIND privilege on the database D. SECADM authority on the database E. CREATEIN privilege on the schema Answer: B, E Question: 55 What demonstrates the correct syntax for assigning three rows to the EMPNO, FIRSTNAME, and LASTNAME columns of a table named EMPLOYEE? A. INSERT INTO employee (empno, firstname, lastname) VALUES (100, 200, 300, 'John', 'Jane', 'Paul', 'Doe', 'Smith', 'Jones') B. INSERT INTO employee (empno, firstname, lastname)
Page 25 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

VALUES (100, 'John', 'Doe'), (200, 'Jane', 'Smith'), (300, 'Paul', 'Jones') C. SET (empno, firstname, lastname) VALUES (100, 200, 300, 'John', 'Jane', 'Paul', 'Doe', 'Smith', 'Jones') FOR employee D. SET (empno, firstname, lastname) VALUES (100, 'John', 'Doe'), (200, 'Jane', 'Smith'), (300, 'Paul', 'Jones') FOR employee Answer: B Question: 56 Your QA team is testing an OLTP application and several SQL procedures from your reporting application. To improve concurrency with other OLTP applications, they want to test a few of your reporting SQL procedures with the isolation level uncommitted read (UR). What are two correct solutions? (Choose two.) A. Use the command "SET CURRENT ISOLATION LEVEL UNCOMMITTED READ" in your required SQL procedures code and recompile them. B. Set the DB2SET command to set DB2_SQLROUTINE_PREPOPTS="ISOLATION UR" at the instance level. C. Set the WITH UR option in your SELECT statement in your required SQL procedure code and recompile. D. CALL SYSPROC.SET_ROUTINE_OPTS('ISOLATION UR') before recompiling the required SQL procedure without making any changes in the SQL procedure code. E. CALL SYSPROC.REBIND_ROUTINE_PACKAGE('P','schema.procedurename','ISOLATION UR') for each required SQL procedure without making any changes in the SQL procedure code. Answer: C, D Question: 57 Which two actions are supported by Data Studio in the SQL procedure lifecycle? (Choose two.) A. Create global temporary tables to use in the SQL procedure. B. Debug the SQL procedure. C. Deploy the SQL procedure. D. Use auto complete SQL statements. E. Create user-define types in the SQL procedure. Answer: B, C Question: 58 Which two SQL statements are allowed for a BEFORE trigger? (Choose two.) A. INSERT B. CALL C. MERGE D. SIGNAL E. UPDATE Answer: B, D Question: 59 Which CREATE TRIGGER statement is valid?

Page 26 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. CREATE TRIGGER test1 NO CASCADE AFTER INSERT ON employee REFERENCING NEW AS n FOR EACH ROW MODE DB2SQL WHEN (n.bonus IS NULL) SET n.salary = n.salary + 2000 B. CREATE TRIGGER test1 NO CASCADE BEFORE INSERT ON employee REFERENCING NEW AS n FOR EACH ROW MODE DB2SQL WHEN (n.bonus IS NULL) SET n.salary = n.salary + 2000 C. CREATE TRIGGER test1 AFTER DELETE ON employee REFERENCING OLD_TABLE AS oldemployee FOR EACH STATEMENT MODE DB2SQL DELETE FROM staff WHERE id IN (SELECT empno FROM oldemployee) D. CREATE TRIGGER test1 NO CASCASE BEFORE DELETE ON employee FOR EACH STATEMENT MODE DB2SQL DELETE FROM staff WHERE id IN (SELECT empno FROM oldemployee) Answer: B Question: 60 Click the Exhibit button. Given the SQL procedure definition shown in the exhibit, what will the value of the P_OUT parameter be if the procedure is invoked with a value of 11 for the P_IN parameter?

Page 27 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. 3 B. 29 C. 99 D. NULL Answer: D Question: 61 The CREATE PROCEDURE statement shown below was executed against a database called MYDB CREATE PROCEDURE myschema.proc1(IN p1 INTEGER, OUT p2 CHAR(4), OUT p3 SMALLINT) BEGIN SET p2 = 'abc'; END Which two CREATE PROCEDURE statements, when executed against the same database, will succeed? (Choose two.) A. CREATE PROCEDURE myschema.proc1(IN p1 CHAR(4), OUT p2 INTEGER) BEGIN SET p2 = 123; END B. CREATE PROCEDURE myschema.proc1(IN p1 INTEGER, OUT p2 CHAR(4), OUT p3 CHAR(4)) BEGIN SET p2 = 'abc'; END C. CREATE PROCEDURE myschema.proc1(IN p1 CHAR(4), OUT p2 INTEGER, OUT p3 SMALLINT) BEGIN SET p2 = 123; END D. CREATE PROCEDURE otherschema.proc1(IN p1 CHAR(4), OUT p2 CHAR(4), OUT p3 CHAR(4)) BEGIN SET p2 = 'abc'; END E. CREATE PROCEDURE myschema.proc1(IN p1 NUMBER, OUT p2 NUMBER, OUT p3 NUMBER) BEGIN SET p2 = 'abc'; END Answer: A, D Question: 62

Page 28 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

Click the Exhibit button. If the procedure TEST1 shown in the exhibit is called with the value 'A00' specified for the SOMEID parameter, what is the expected return code?

A. 0 B. -1 C. -2 D. -3 Answer: A Question: 63 Given the variable declaration shown below: DECLARE v_mytime TIME; Which statement will assign a value to the variable named V_MYTIME? A. SET v_mytime = TIME; B. VALUES CURRENT TIME INTO v_mytime;
Page 29 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

C. VALUES CURRENT TIMESTAMP INTO v_mytime; D. SET v_mytime = DATE; Answer: B Question: 64 Which two procedures demonstrate the correct use of dynamic SQL? (Choose two.) A. CREATE PROCEDURE update_count1 (IN new_count INTEGER, IN item_code INTEGER) BEGIN DECLARE v_dynSQL VARCHAR(200); SET v_dynSQL = 'UPDATE stock SET quantity_on_hand=? WHERE item_number=?'; PREPARE v_stmt1 FROM v_dynSQL; EXECUTE v_stmt1 USING new_count, item_code; END B. CREATE PROCEDURE update_count2 (IN tab_name VARCHAR(128), IN new_count INTEGER, IN item_code INTEGER) BEGIN DECLARE v_dynSQL VARCHAR(200); SET v_dynSQL = 'UPDATE ? SET quantity_on_hand=? WHERE item_number=?'; PREPARE v_stmt1 FROM v_dynSQL; EXECUTE v_stmt1 USING tab_name, new_count, item_code; END C. CREATE PROCEDURE update_count3 (IN new_count INTEGER, IN item_code INTEGER) BEGIN DECLARE v_dynSQL VARCHAR(200); SET v_dynSQL = 'UPDATE stock SET quantity_on_hand=' || CHAR(new_count) || ' WHERE item_number=' || CHAR(item_code); EXECUTE IMMEDIATE v_dynSQL; END D. CREATE PROCEDURE update_count4 (IN tab_name VARCHAR(128), IN col_name1 VARCHAR(128), IN col_name2 VARCHAR(128), IN new_count INTEGER, IN item_code INTEGER) BEGIN DECLARE v_dynSQL VARCHAR(200); SET v_dynSQL = 'UPDATE ? SET ?=? WHERE ?=?'; PREPARE v_stmt1 FROM v_dynSQL; EXECUTE v_stmt1 USING tab_name, col_name1, new_count, col_name2, item_code; END E. CREATE PROCEDURE update_count5 (IN new_count INTEGER, IN item_code INTEGER) BEGIN DECLARE v_dynSQL VARCHAR(200); DECLARE v_col_name VARCHAR(128); SET_col_name = 'item_number'; SE v_dynSQL = 'UPDATE stock SET quantity_on_hand=? WHERE ?=?'; PEPARE v_stmt1 FROM v_dynSQL; EXECUTE v_stmt1 USING new_count, v_col_name, item_code; END Answer: A, C Question: 65 Click the Exhibit button. A trigger was created as shown in the exhibit. The UPDATE statement shown below is executed. UPDATE dept SET sales_id = '300' WHERE sales_id = '200' How many row(s) are updated in the EMPLOYEE table?

Page 30 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. 0 B. 1 C. 2 D. 3 Answer: B Question: 66 what demonstrates the correct syntax for assigning three rows to the EMPNO, FIRSTNAME, and LASTNAME columns of a table named EMPLOYEE? A. INSERT INTO employee (empno, firstname, lastname) VALUES (100, 200, 300, 'John', 'Jane', 'Paul', 'Doe', 'Smith', 'Jones') B. INSERT INTO employee (empno, firstname, lastname) VALUES (100, 'John', 'Doe'), (200, 'Jane', 'Smith'), (300, 'Paul', 'Jones') C. SET (empno, firstname, lastname) VALUES (100, 200, 300, 'John', 'Jane', 'Paul', 'Doe', 'Smith', 'Jones') FOR employee D. SET (empno, firstname, lastname) VALUES (100, 'John', 'Doe'), (200, 'Jane', 'Smith'), (300, 'Paul', 'Jones')
Page 31 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

FOR employee Answer: B Question: 67 What are two valid DECLARE statements in an SQL procedure? (Choose two.) A. DECLARE var1 INTEGER; B. DECLARE var1 DECIMAL [9]; C. DECLARE var1 XML; D. DECLARE var1 CURRENT DATE; E. DECLARE var1[10] INTEGER; Answer: A, C Question: 68 Click the Exhibit button. A DB2 Command Line Processor (CLP) file contains the set of statements shown in the exhibit. What does this sequence of statements illustrate?

A. work identity B. row sequencing C. row change tokenizing D. optimistic locking Answer: D Question: 69 Click the Exhibit button. Given the code segment shown in the exhibit, which statement accurately describes the result?

Page 32 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. For activities whose description has not changed, update the description in the ARCHIVE table. For new activities, insert into the ARCHIVE table. The ARCHIVE and ACTIVITIES table both have ACTIVITY as a primary key. B. For activities whose description has changed, update the description in the ARCHIVE table. For new activities, insert into the ARCHIVE table. The ARCHIVE and ACTIVITIES table both have ACTIVITY as a primary key. C. For activities whose description has changed, update the description in the ACTIVITY table. For new activities, insert into the ACTIVITIES table. The ARCHIVE and ACTIVITIES table both have ACTIVITY as a primary key. D. The statement will fail since MERGE is not a supported operator.

Answer: B Question: 70 A developer wants to create an SQL procedure that will convert a temperature from degrees Fahrenheit to degrees Centigrade. It is anticipated that the procedure will be invoked from another procedure using a CALL statement that looks like this: CALL proc.f_to_c(old_temp, new_temp); Which statement will successfully create an SQL procedure that accepts one temperature value and returns another when called as shown? A. CREATE PROCEDURE proc.f_to_c(temp_f REAL, temp_c REAL) BEGIN DECLARE temp_value REAL; SET temp_value = (temp_f - 32); SET temp_c = (5 * temp_value) / 9; END B. CREATE PROCEDURE proc.f_to_c(temp_f REAL, INOUT temp_c REAL) BEGIN DECLARE temp_value REAL; SET temp_value = (temp_f - 32); SET temp_c = (5 * temp_value) / 9; END C. CREATE PROCEDURE proc.f_to_c(INOUT temp_f REAL, OUT temp_c REAL) BEGIN DECLARE temp_value REAL; SET temp_value = (temp_f - 32); SET temp_c = (5 * temp_value) / 9; END D. CREATE PROCEDURE proc.f_to_c(IN temp_f, OUT temp_c) BEGIN DECLARE temp_value REAL; SET temp_value = (temp_f - 32); SET temp_c = (5 * temp_value) / 9; END

Page 33 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

Answer: B Question: 71 Which two statements are true? (Choose two.) A. SQL procedures can contain static and/or dynamic SQL statements. B. Static or dynamic SQL execution is not associated with a package. C. The SQL procedure is always associated with a package that contains access paths of SQL statements in the procedure. D. It is necessary for an end-user to have object level privileges if that user has execute privileges on an associated package and the SQL procedure. E. SQL procedures can have COMMIT or ROLLBACK within atomic compound statements. Answer: A, C Question: 72 A. ALTER PROCEDURE schema.procname HIDE PROCEDURE BODY; B. ALTER PROCEDURE schema.procname ENCRYPT PROCEDURE BODY; C. GET ROUTINE INTO sp.sar FROM PROCEDURE schema.procname ENCRYPT BODY DROP PROCEDURE schema.procname PUT ROUTINE FROM sp.sar D. GET ROUTINE INTO sp.sar FROM PROCEDURE schema.procname HIDE BODY DROP PROCEDURE schema.procname PUT ROUTINE FROM sp.sar Answer: D Question: 73 Click the Exhibit button. Referring to the exhibit, what is the number of rows that will be inserted in table T1 after calling the SQL procedure P1?

Page 34 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. 9 B. 10 C. 19 D. 20 Answer: C Question: 74 Given the procedure shown below: CREATE PROCEDURE proc () BEGIN ATOMIC INSERT INTO mytable (col1) VALUES ('a'); INSERT INTO mytable (col1) VALUES ('b'); SIGNAL SQLSTATE '70000'; INSERT INTO mytable (col1) VALUES ('c'); END How many rows will be inserted in the table? A. 0
Page 35 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

B. 1 C. 2 D. 3 Answer: A Question: 75 Click the Exhibit button. Referring to the exhibit, which two statements are correct? (Choose two.)

A. If the EMPLOYEE_TEMP table exists, the execution order is 1,2,3. B. If the EMPLOYEE_TEMP table does not exist, the execution order is 1,4,3. C. If the EMPLOYEE_TEMP table exists, the execution order is 4,1,2,3. D. If the EMPLOYEE_TEMP table does not exist, the execution order is 4,1,3. E. If the messages table does not exist, the SQL procedure will still compile. Answer: A, B Question: 76 Which two rules apply to the REFERENCING clause in a CREATE TRIGGER statement? (Choose two.) A. The OLD correlation-name and the OLD TABLE identifier can be used if the trigger event is an INSERT operation. B. The OLD correlation-name and the OLD TABLE identifier can be used if the trigger event is an UPDATE operation. C. The scope of each correlation-name and identifier used is the entire trigger definition. D. The OLD TABLE or NEW TABLE identifiers can be defined in a BEFORE trigger. E. A NEW correlation-name can be specified more than once for a trigger. Answer: B, C Question: 77 Click the Exhibit button. A developer attempted to create a procedure to determine the oldest employee celebrating a birthday in a particular month by executing the SQL statement shown in the exhibit. Tests show the procedure does not work as planned. What are two ways to make the procedure work as intended? (Choose two.)

Page 36 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. Add the statement ALSE RETURN; before the statement AND IF; B. Change the statement ALSEIF UCASE(b_month) != UCASE(month) THEN to ALSEIF UCASE(b_month) = UCASE(month) THEN C. Add the statement ALSE BREAK; before the statement ND IF; D. Change the statement ALSEIF UCASE(b_month) != UCASE(month) THEN ITERATE this_loop; to ALSEIF UCASE(b_month) = UCASE(month) THEN LEAVE this_loop; E. Add the statement ALSE CONTINUE; before the statement AND IF; Answer: A, D Question: 78 Click the Exhibit button. A user-defined function was created using the statement shown in the exhibit. What is the correct way to invoke this function from the DB2 Command Line Processor?

Page 37 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. SELECT * FROM emp_birthmonth(8) B. VALUES emp_birthmonth(8) C. SELECT * FROM TABLE(emp_birthmonth(8)) D. VALUES emp_birthmonth(INTEGER(8)) Answer: C Question: 79 Click the Exhibit button. The table and triggers in the exhibit have been created successfully, when the statements shown below are executed. INSERT INTO emp_hours VALUES('KAY', '9:00', '17:00'); INSERT INTO emp_hours (emp_name, starting) VALUES('BILL', '9:00'); What is the result?

A. Table EMP_HOURS will contain these rows:


Page 38 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

KAY 9:00:00 AM 5:00:00 PM BILL 9:00:00 AM 10:00:00 AM B. Table EMP_HOURS will contain this row: BILL 9:00:00 AM C. Table EMP_HOURS will contain these rows: KAY 9:00:00 AM 5:00:00 PM BILL 9:00:00 AM D. Table EMP_HOURS will contain this row: BILL 9:00:00 AM 17:00:00 PM Answer: A Question: 80 What are two valid special registers? (Choose two.) A. CURRENT_CLIENT_ACCT B. CURRENT_SCHEMA C. CURRENT_PATH D. CURRENT_DATETIME E. CURRENT_PARTITION Answer: B, C Question: 81 A trigger was created using the CREATE TRIGGER statement shown below. CREATE TRIGGER incrs_comm AFTER INSERT ON staff FOR EACH ROW MODE DB2SQL UPDATE staff SET comm = comm * 1.1 Which statement is true about the INCRS_COMM trigger? A. The trigger will be executed if the STAFF table is populated by a load operation. B. The trigger will be executed before a row is inserted into the STAFF table. C. This trigger will be executed after a row is inserted into the STAFF table. D. This trigger will increase the comm value of a newly inserted row by 10 percent. Answer: C Question: 82 Which two actions are supported by Data Studio in the SQL procedure lifecycle? (Choose two.) A. Create global temporary tables to use in the SQL procedure. B. Debug the SQL procedure. C. Deploy the SQL procedure. D. Use auto complete SQL statements. E. Create user-define types in the SQL procedure. Answer: B, C Question: 83 What is the correct order for declarations in a compound statement defined by BEGIN and END? A. variable, cursor, handler, condition
Page 39 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

B. variable, condition, cursor, handler C. variable, condition, handler, cursor D. variable, cursor, condition, handler Answer: B Question: 84 Which two statements describe a CASE statement? (Choose two.) A. CASE statements are used to enter into some logic based on a literal value. B. CASE statements are used to enter into some logic based on the value of an expression. C. CASE statements are used to return control to the beginning of an expression. D. CASE statements are used to enter into some condition and loop until the condition is met. E. CASE statements are used to iterate into some logic based on a literal value. Answer: A, B Question: 85 Click the Exhibit button. A developer created a user-defined function using the statement shown in the exhibit. Now, the developer would like to see the access plan used by the query in the function. What are the steps needed to do this from a CLP script file?

A. 1. Set the CURRENT EXPLAIN MODE special register to EXPLAIN. 2. Execute the CREATE FUNCTION statement. 3. Set the CURRENT EXPLAIN MODE special register to NO. 4. Run the db2exfmt utility. B. 1. Set the CURRENT EXPLAIN MODE special register to EXPLAIN. 2. Execute the query portion of the CREATE FUNCTION statement (replace dept_employees.deptno with a hard-coded value). 3. Set the CURRENT EXPLAIN MODE special register to NO. 4. Run the db2exfmt utility. C. 1. Set the CURRENT EXPLSNAP special register to EXPLAIN. 2. Execute the CREATE FUNCTION statement. 3. Set the CURRENT EXPLSNAP special register to NO. 4. Run the db2exfmt utility. D. 1. Set the CURRENT EXPLSNAP special register to EXPLAIN. 2. Execute the query portion of the CREATE FUNCTION statement (replace dept_employees.deptno with a hard-coded value).
Page 40 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

3. Set the CURRENT EXPLSNAP special register to NO. 4. Run the db2exfmt utility. Answer: B Question: 86 Click the Exhibit button. An SQL function was created using the statement shown in the exhibit. Assume this function is invoked by executing the SQL statement shown below: VALUES e_degree(SMALLINT(17)) What will be returned?

A. SQL0440N No authorized routine named "E_DEGREE" of type "FUNCTION" having compatible arguments was found. SQLSTATE=42884 B. 1 -----------BACHELOR 1 record(s) selected. C. 1 -----------MASTER 1 record(s) selected. D. 1 -----------UNKNOWN 1 record(s) selected. Answer: D

Page 41 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

Question: 87 Which option is used when declaring a global temporary table that will keep its data across transaction boundaries? A. ON ROLLBACK DELETE ROWS B. ON ROLLBACK PRESERVE ROWS C. ON COMMIT PRESERVE ROWS D. ON COMMIT DELETE ROWS Answer: C Question: 88 Click the Exhibit button. The file myscript.sql (shown in the exhibit) is executed from the CLP using the command: db2 -td@ -vf myscript.sql What is the expected outcome?

A. SQL procedures PROCA and PROCB will be created, but the CALL command will fail. B. SQL procedure PROCA will not be created. C. SQL procedures PROCA and PROCB will be created and the CALL command will succeed. D. SQL procedure PROCB will not be created. Answer: B 0Question: 89 Click the Exhibit button.Given the SQL procedure shown in the exhibit, what will the value of the P_ID parameter be if the procedure is invoked and a value of 2 is specified for the START_VALUE parameter

Page 42 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. 1 B. 2 C. 3 D. 4 Answer: C Question: 90 Which statement will create a scalar function named FCN1? A. CREATE SCALAR FUNCTION fcn1(v1 CHAR(3)) RETURNS CHAR(3) B. CREATE FUNCTION fcn1(v1 CHAR(3)) RETURNS ROW CONTAINING CHAR(3) C. CREATE SCALAR FUNCTION fcn1(v1 CHAR(3)) RETURNS ROW CONTAINING CHAR(3) D. CREATE FUNCTION fcn1(v1 CHAR(3)) RETURNS CHAR(3) Answer: D Question: 91 Which SQL procedure returns two cursors to the application, by-passing any intermediary SQL procedures? A. CREATE PROCEDURE read_employee_and_dept() DYNAMIC RESULT SETS 1 BEGIN DECLARE c_emp CURSOR WITH RETURN TO CALLER FOR SELECT salary, bonus, comm FROM employee WHERE job != 'PRES'; DECLARE c_dept CURSOR WITH RETURN TO CALLER FOR SELECT deptno, deptname, mgrno FROM department; END B. CREATE PROCEDURE read_employee_and_dept() DYNAMIC RESULT SETS 2 BEGIN DECLARE c_emp CURSOR WITH RETURN TO CLIENT FOR SELECT salary, bonus, comm FROM employee WHERE job != 'PRES';
Page 43 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

DECLARE c_dept CURSOR WITH RETURN TO CLIENT FOR SELECT deptno, deptname, mgrno FROM department; OPEN c_emp; OPEN c_dept; END C. CREATE PROCEDURE read_employee_and_dept() DYNAMIC RESULT SETS 2 BEGIN DECLARE c_emp CURSOR WITH RETURN TO CLIENT FOR SELECT salary, bonus, comm FROM employee WHERE job != 'PRES'; DECLARE c_dept CURSOR WITH RETURN TO CLIENT FOR SELECT deptno, deptname, mgrno FROM department; END D. CREATE PROCEDURE read_employee_and_dept() DYNAMIC RESULT SETS 2 BEGIN DECLARE c_emp CURSOR WITH RETURN TO CALLER FOR SELECT salary, bonus, comm FROM employee WHERE job != 'PRES'; DECLARE c_dept CURSOR WITH RETURN TO CALLER FOR SELECT deptno, deptname, mgrno FROM department; OPEN c_emp; OPEN c_dept; END Answer: B Question: 92 Click the Exhibit button. Given the two functions in the exhibit, what is the correct command to invoke the function which calculates the sum of two numbers from an SQL procedure?

A. SELECT sum_of_2 FROM table1; B. SELECT sum(2,4,?); C. SET res_sum = sum(2,6); D. CALL sum(?,?,?);

Page 44 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

Answer: C Question: 93 Given the function shown below: CREATE FUNCTION fcn1(v1 VARCHAR(50)) RETURNS VARCHAR(50) SPECIFIC fcn2 RETURN LTRIM(RTRIM(v1)) Which statement will invoke the function? A. SELECT * FROM VALUES LENGTH(fcn2(' one good day ')) B. VALUES LENGTH( fcn1(' one good day ')) C. CALL VALUES LENGTH(fcn1(' one good day ')) D. CALL LENGTH(fcn2(' one good day ')) Answer: B Question: 94 Which statement will let you use the result set from the nested procedure CALLEE? A. ASSOCIATE RESULT SET LOCATOR( loc1) WITH PROCEDURE callee; B. BIND RESULT SET WITH PARAMETERS FOR PROCEDURE callee; C. INSERT RESULT SET FROM callee INTO CURSOR c1; D. SELECT * FROM callee; Answer: A Question: 95 Click the Exhibit button.

Which statement is true about the CASE statement shown in the exhibit?

A. An employee with a rating of 1 receives a 10% salary increase. B. An employee with a rating of 3 receives no salary increase. C. An employee with a rating of 2 receives a 3% salary increase. D. All employees will receive at least a 5% salary increase. Answer: A
Page 45 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

Question: 96 Click the Exhibit button. The procedure TEST5 shown in the exhibit was invoked. How many rows will be added to the DEPT table?

A. 1 B. 2 C. 3 D. 4 Answer: C Question: 97 Click the Exhibit button. If the procedure shown in the exhibit is invoked, and the UPDATE statement returns an SQL0100W "No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table. SQLSTATE '02000'", which two situations will be true? (Choose two)

Page 46 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. P_SQLSTATE will be set to '00000' and P_SQLCODE will be set to 0. B. P_SQLSTATE will be set to '02000' and P_SQLCODE will be set to 100. C. P_SQLSTATE will be set to '00000' and P_SQLCODE will be set to 100. D. The caller will receive an SQLCODE of 0. E. The caller will receive an SQLCODE of 100. Answer: A, E Question: 98 Click the Exhibit button. Given the user-defined function shown in the exhibit, what will the function return if invoked using the statement shown below? SELECT check_id(1) FROM SYSIBM.SYSDUMMY1

Page 47 of 48

Exam Name: Exam Type: Exam Code:

DB2 9.5 SQL Procedure Developer IBM 000-735

Total Questions:

98

A. Error: ID 1 is not valid B. Application Error C. SQLSTATE 80000 will be returned, with the custom error message "Error: ID 1 is not valid" D. NULL Answer: D

End of Document

Page 48 of 48

Vous aimerez peut-être aussi