IBM Assessment: DB2 9.7 Application Development - A2090-543 Exam Practice Test

Question 1
A PHP Web application uses the ibm_db2 extension to establish a persistent connection to a remote database. What must be true of the connections to make full use of the db2_pconnect() API?

Correct Answer: A
Question 2
Which statement is true of an application that only uses static SQL?

Correct Answer: A
Question 3
Given the two tables shown below: TAB1 LETTER GRADE A 80 B 70 C 60 TAB2 LETTER GPA A 4 C 2 D 1 and the successful execution of the following query: SELECT * FROM tab1 FULL OUTER JOIN tab2 ON tab1.letter = tab2.letter; How many rows will be returned?

Correct Answer: C
Question 4
What are two valid values for the PARAMETER STYLE clause in the CREATE PROCEDURE statement? (Choose two.)

Correct Answer: B,D
Question 5
While developing a Java JDBC application, you use the set of statements shown below:
Connection con;
Statement stmt;
intnumUpd;
stmt = con.createStatement();
numUpd= stmt.executeUpdate("UPDATE EMPLOYEE SET PHONENO='4657' WHERE
EMPNO=?");
stmt.close();
con.close();
Assuming a connection has already been established, which statement is true?

Correct Answer: D
Question 6
A PHP application using the ibm_db2 extension encounters an error executing the SQL shown
below:
<?php
$applicant = array( $_POST["userid"] );
$stmt = db2_prepare( $conn, "INSERT INTO hr.applicants (userid) VALUES ( ? )" );
if ($stmt) {
$result = db2_execute( $stmt, $applicant );
if (!result) {
// Handle Errors
}
}
>
Which command retrieves the SQLSTATE explaining the error?

Correct Answer: B
Question 7
Which two Java objects can be used to produce a result set using a SELECT statement? (Choose two.)

Correct Answer: C,D
Question 8
Which two commands can be used to make use of the latest statistics? (Choose two.)

Correct Answer: B,D
Question 9
Click the Exhibit button.
UPDATE DBM CFG USING FEDERATED YES;
db2stop;
db2start;
CONNECT TO test;
CREATE WRAPPER oledb LIBRARY 'db2oledb';
CREATE SERVER nwind
WRAPPER oledb
OPTIONS (CONNECTSTRING 'Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=f:Northwind.mdb;', COLLATING_SEQUENCE 'Y');
CREATE FUNCTION nwind.customers()
RETURNS TABLE (customerid CHAR(5),
companynameVARCHAR(40),
contactnameVARCHAR(30),
contacttitleVARCHAR(30),
address VARCHAR(60),
city VARCHAR(15),
region VARCHAR(15),
postalcodeVARCHAR(15),
country VARCHAR(24),
phone VARCHAR(24),
fax VARCHAR(24))
LANGUAGE OLEDB
EXTERNAL NAME 'nwind!customers';
COMMIT;
CONNECT RESET;
A DB2 Command Line Processor script file containing the commands and statements shown in
the exhibit was executed successfully.
Which statement can be used to verify that an OLE DB table function designed to retrieve data
from the CUSTOMERS table of the NORTHWIND Microsoft Access database was created
successfully?

Correct Answer: C
Question 10
Click the Exhibit button.
CONNECT TO test;
CREATE TABLE tab_a (col1 INT);
CREATE TABLE tab_b (col1 INT);
INSERT INTO tab_a VALUES (1), (2), (3), (4);
INSERT INTO tab_b VALUES (1), (1), (2), (2);
CONNECT RESET;
A DB2 Command Line Processor script file containing the commands and statements shown in
the exhibit was executed successfully.
If the statement shown below is executed:
UPDATE tab_a SET col1 = 10 WHERE col1 IN (SELECT * FROM tab_b);
How many rows in table TAB_A will be modified?

Correct Answer: A