19.06.2013 Views

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7.4.4 ODBC support <strong>for</strong> 2 MB SQL<br />

7.4.5 SQLcancel<br />

Currently, the maximum size in bytes of an SQL statement string (including white spaces)<br />

allowed on the SQLPrepare, SQLExecDirect and SQLNativeSql APIs is 32765. <strong>DB2</strong> V8<br />

running in NFM supports a maximum statement size of 2MB (2097152). <strong>DB2</strong> V8 ODBC will<br />

now support SQL statements up to 2 MB in size when connected to <strong>DB2</strong> V8 servers running<br />

in NFM.<br />

This enhancement requires APAR PQ88582/PTF UQ91257.<br />

The SQL cancel() statement allows an ODBC/CLI or JDBC application to cancel an SQL<br />

request long running on a <strong>DB2</strong> server. Note that SQL cancel() is at a more granular level than<br />

the <strong>DB2</strong> -CANCEL THREAD command. SQLcancel() only rolls back the currently executing<br />

SQL statement, not the entire unit of work. In addition, the thread is not destroyed in the<br />

process, but is allowed to continue processing.<br />

If the database server is not in an interruptible state, the request completed be<strong>for</strong>e <strong>DB2</strong> can<br />

interrupt, or the request is not interruptible, then <strong>DB2</strong> returns a DRDA reply message back to<br />

the client confirming the attempt. A new SQLCODE -952 is returned if the SQL statement was<br />

interrupted (rollback worked). If the SQL statement just reads data (not write), then we issue<br />

-952 even if rollback did not work.<br />

Currently only dynamic SQL statements are interruptible. Stored procedures cannot be<br />

interrupted. Transaction level SQL statements like CONNECT, COMMIT and ROLLBACK<br />

cannot be interrupted. Even BIND PACKAGE cannot be interrupted.<br />

7.5 XML support in <strong>DB2</strong> <strong>for</strong> z/<strong>OS</strong> V8<br />

7.5.1 XML extender<br />

For the past few years, XML has increasingly become the de facto data <strong>for</strong>mat on the internet,<br />

on corporate intranets, and <strong>for</strong> data exchange.<br />

Up to <strong>DB2</strong> V7, you could use LOB or CLOB columns to store XML documents in relational<br />

tables. It was recommended that character objects be used to enable use of SQL character<br />

functions, such as concatenate, on the XML CLOBs.<br />

If you needed XML data from traditional relational databases, you had to create an application<br />

to convert the <strong>DB2</strong> data to the XML <strong>for</strong>mat or use the XML extender.<br />

<strong>DB2</strong> V8 provides SQL/XML publishing functions to help with XML document composition<br />

directly from <strong>DB2</strong> data.<br />

Up to <strong>DB2</strong> V7, you could use the XML extender feature <strong>for</strong> manipulating XML data into and<br />

out of <strong>DB2</strong>.<br />

Description<br />

The XML extender is a set of external programs which are defined to execute as stored<br />

procedures and user-defined functions, invoked using SQL statements. The functionality<br />

provided by the XML extender is very rich, including intact storage, shredding to relational<br />

tables, indexing and searching. However, this function is still seen as an “add on” and the<br />

external routines do not per<strong>for</strong>m as well as code inside the database engine.<br />

Chapter 7. Networking and e-business 307

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!