Ensurepass.com : Ensure you pass the IT Exams
2018 Jan IBM Official New Released C2090-543
100% Free Download! 100% Pass Guaranteed!
http://www.EnsurePass.com/C2090-543.html

DB2 9.7 Application Development

Question No: 71 – (Topic 2)

A CLI/ODBC application contains the lines of code shown below: SQLHANDLE hstmt; /* statement handle */

SQLCHAR *stmt = (SQLCHAR *)quot;DELETE FROM org WHERE deptnumb = ? quot;; SQLSMALLINT parameter1=5;

SQLAllocHandle(SQL_HANDLE_STMT, hdbc, amp;hstmt);

SQLSetStmtAttr(hstmt, SQL_ATTR_DEFERRED_PREPARE, SQL_DEFERRED_PREPARE_OFF );

If table ORG does not exist, which two CLI/ODBC APIs will return SQL_ERROR in the variable RC? (Choose two.)

  1. rc = SQLExecute(hstmt);

  2. rc = SQLSetConnectAttr( hdbc, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)SQL_AUTOCOMM?IT_OFF, SQL_NTS);

  3. rc = SQLBindParameter(hstmt, 1, SQL_PARAM_INPUT, SQL_C_SHORT, SQL_SMALLINT, 0, 0,

    amp;parameter1, 0, NULL);

  4. rc = SQLPrepare(hstmt, stmt, SQL_NTS);

Answer: A,D

Question No: 72 – (Topic 2)

When creating a trusted connection in CLI/ODBC, it is necessary to set a connection attribute.

What is the connection attribute?

  1. SQL_ATTR_TRUSTED_CONTEXT_USERID

  2. SQL_ATTR_TRUSTED_CONTEXT_PASSWORD

  3. SQL_ATTR_USE_TRUSTED_CONTEXT

  4. SQL_ATTR_ENABLE_TRUSTED_CONTEXT

Answer: C

Question No: 73 – (Topic 2)

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?

  1. The commitment control mode must be set to manual commit mode.

  2. Connections must be established under the same user authentication credentials.

  3. The persistent connection must be explicitly closed after the database work has completed.

  4. The commitment control mode must be set to autocommit mode.

Answer: B

Question No: 74 – (Topic 2)

While developing a CLI application, you use the code shown below:

SQLCHAR *stmt = (SQLCHAR *)quot;DELETE FROM org WHERE deptnumb = ? quot;;

cliRC = SQLSetStmtAttr(hstmt, SQL_ATTR_DEFERRED_PREPARE, SQL_DEFERRED_PREPARE_ON )

cliRC = SQLPrepare(hstmt, stmt, SQL_NTS);

Now, the ORG table does not exist in the database.

What will be the value of quot;cliRCquot; after executing the SQLPrepare command?

  1. SQL_SUCCESS

  2. SQL_SUCCESS_WITH_INFO

  3. SQL_INVALID_HANDLE

  4. SQL_ERROR

Answer: A

Question No: 75 – (Topic 2)

What are two valid values for the PARAMETER STYLE clause in the CREATE PROCEDURE statement? (Choose two.)

  1. C

  2. JAVA

  3. SQL WITH NULLS

  4. GENERAL WITH NULLS

Answer: B,D

Question No: 76 – (Topic 2)

An application connecting to a DB2 database using the IBM Data Server Provider for .NET is seeing

performance degradation after 100 active users.

Which Visual Basic .NET command string enables the re-use of the database connections?

  1. Dim connectString As String = quot;Database=SAMPLE;UID=admin;PWD=pwd; Min Pool Size=10quot;

    Dim conn As DB2Connection = new DB2Connection(connectString)

  2. Dim connectString As String = quot;Database=SAMPLE;UID=admin;PWD=pwd; Min Pool Size=10quot;

    Dim conn As DB2Connection = new SqlConnection(connectString)

  3. Dim connectString As String = quot;Database=SAMPLE;UID=admin;PWD=pwd;Pooling=100;quot;

    Dim conn As DB2Connection = new DB2Connection(connectString)

  4. Dim connectString As String = quot;Database=SAMPLE;UID=admin;PWD=pwd;Pooling=100;quot;

Dim conn As DB2Connection = new SqlConnection(connectString)

Answer: A

Question No: 77 – (Topic 2)

A stored procedure is invoked that can return multiple result sets.

After processing the first result set, which CLI/ODBC API can be used to determine if another result set exists?

  1. SQLMoreResults()

  2. SQLFetchScroll()

  3. SQLGetInfo()

  4. SQLGetData()

Answer: A

Question No: 78 – (Topic 2)

Which steps are necessary to issue a batch update using a single SQL statement? (Note: The statement has several sets of input parameter markers and is issued from a database application using the IBM Data Server Driver for JDBC.)

  1. Create a PreparedStatement object; add the parameter markers to the batch using the addBatch() method; assign values to each set of parameter marker values; execute the statement using the executeQuery() method.

  2. Create a Statement object; add the parameter markers to the batch using the addBatch() method; assign values to each set of parameter marker values; execute the statement using the executeQuery() method.

  3. Create a PreparedStatement object; assign values to each set of parameter marker values; add the parameter markers to the batch using the addBatch() method; execute the statement using the executeBatch() method.

  4. Create a Statement object; assign values to each set of parameter marker values; add the parameter markers to the batch using the addBatch() method; execute the statement using the executeBatch() method.

Answer: C

Question No: 79 – (Topic 2)

Given the table COURSES shown below: COURSES

——————- ID CODE NAME

  1. ECE100 Operating Systems

  2. ECE101 Programming Languages 3 ECE102 Intro to Databases

User USER1 executes the following statements:

DECLARE GLOBAL TEMPORARY TABLE tempcourses

LIKE db2user.courses;

INSERT INTO session.tempcourses SELECT * FROM db2user.courses; SELECT max(ID) FROM session.tempcourses;

Assuming autocommit is on, which result will user USER1 obtain?

  1. no value

  2. value 1

  3. value 2

  4. value 3

Answer: A

Question No: 80 – (Topic 2)

A JDBC application uses the quot;com.ibm.db2.jcc.DB2Driverquot; driver.

Which two JDBC code snippets illustrate establishing valid connections to a DB2 database named MYDB? (Choose two.)

  1. String url = quot;jdbc:db2://myhost:5021/mydb:user=myuser;password=mypwd;quot;; Connection conn = DriverManager.getConnection (url);

  2. // Assume a DataSource object named mydb was created by the system administrator DB2SimpleDataSource dbds=new DB2SimpleDataSource();

    DataSource ds = (DataSource)dbds.lookup(quot;jdbc/mydbquot;); conn = ds.getConnection();

  3. String url = quot;jdbc:db2://myhost/mydbquot;

    Connection conn = DriverManager.getConnection (url);

  4. // Assume a DataSource object named mydb was created by the system administrator Context ctx=new InitialContext();

DataSource ds = (DataSource)ctx.lookup(quot;jdbc/mydbquot;); conn = ds.getConnection();

Answer: A,D

100% Ensurepass Free Download!
Download Free Demo:C2090-543 Demo PDF
100% Ensurepass Free Guaranteed!
C2090-543 Dumps

EnsurePass ExamCollection Testking
Lowest Price Guarantee Yes No No
Up-to-Dated Yes No No
Real Questions Yes No No
Explanation Yes No No
PDF VCE Yes No No
Free VCE Simulator Yes No No
Instant Download Yes No No

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.