<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>NewPush &#187; pureXML</title> <atom:link href="http://newpush.com/tag/purexml/feed/" rel="self" type="application/rss+xml" /><link>http://newpush.com</link> <description>Server Hosting, Data Warehouse Hosting, Collaboration</description> <lastBuildDate>Mon, 30 Jan 2012 15:40:45 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Register DTD for pureXML with DB2 9.7</title><link>http://newpush.com/2009/12/register-dtd-for-purexml-with-db2-9-7/</link> <comments>http://newpush.com/2009/12/register-dtd-for-purexml-with-db2-9-7/#comments</comments> <pubDate>Thu, 17 Dec 2009 13:51:14 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[DB2]]></category> <category><![CDATA[DB2 9.7]]></category> <category><![CDATA[DTD]]></category> <category><![CDATA[IBM]]></category> <category><![CDATA[pureXML]]></category> <category><![CDATA[XML]]></category> <category><![CDATA[XML Schema]]></category> <category><![CDATA[XQuery]]></category><guid isPermaLink="false">http://www.wdream.com/?p=434</guid> <description><![CDATA[Problem Even though XML schema has been around for a decade, still many APIs reference a DTD in the XML documents sent back and fourth. Such is the OpenSRS API. DB2 requires an XML schema or a DTD to be &#8230; <a href="http://newpush.com/2009/12/register-dtd-for-purexml-with-db2-9-7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<h4>Problem</h4><p>Even though XML schema has been around for a decade, still many APIs reference a DTD in the XML documents sent back and fourth.  Such is the <a href="http://opensrs.com/resources/documentation/opensrsapixml/index.htm">OpenSRS API</a>.  DB2 requires an XML schema or a DTD to be registered before it will process XML documents that refer to an XML Schema or a DTD.  The process of registering such XSROBJECTs with DB2 has changed in DB2 since version 8.</p><h4>Solution</h4><ul><li>register a DTD using the DB2 9.7 command line:<code><br /> db2 CONNECT TO SAMLE<br /> db2 REGISTER XSROBJECT 'dtd-file-name.dtd' FROM /path/to/dtd/file AS sample.dtd-name DTD<br /> </code><br /> If the command is successful, the output is<code><br /> DB20000I  The REGISTER XSROBJECT command completed successfully.<br /> </code></li><li>Register a DTD from a Java program:<code><br /> String schemaName = "SAMPLE";<br /> String dtdName = "dtd-name";<br /> String dtdFile = "dtd-file-name.dtd";<br /> Reader fis = new FileReader(dtdFile);<br /> byte[] contentDtd = FileIO.readerToString(fis).getBytes();<br /> String registerProcQuery = "CALL SYSPROC.XSR_DTD (?,?,?,?,?)";<br /> PreparedStatement registerProcStatement = conn.prepareCall(registerProcQuery);<br /> registerProcStatement.setString(1, schemaName);<br /> registerProcStatement.setString(2, dtdName);<br /> registerProcStatement.setString(3, dtdFile);<br /> registerProcStatement.setString(4, "PUBLIC ID");<br /> registerProcStatement.setObject(5, contentDtd, java.sql.Types.BLOB);<br /> registerProcStatement.execute();<br /> </code><br /> The <code>FileIO</code> class can be found in <a href="http://www.amazon.com/gp/product/0596007019?ie=UTF8&#038;tag=wdr-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0596007019">Java Cookbook, Second Edition</a><img src="http://www.assoc-amazon.com/e/ir?t=wdr-20&#038;l=as2&#038;o=1&#038;a=0596007019" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li></ul><h4>References</h4><ul><li><a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.db2.luw.admin.cmd.doc/doc/r0023563.html">DB2 9.7 Documentation: REGISTER XSROBJECT</a></li><li><a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.db2.luw.sql.ref.doc/doc/c0024419.html">DB2 9.7 Documentation: XSR_DTD procedure</a></li><li><a href="http://www.amazon.com/gp/product/0738418773?ie=UTF8&#038;tag=wdr-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0738418773">Redbook with Media : DB2 Java Stored Procedures Learning by Example (IBM Redbook)</a><img src="http://www.assoc-amazon.com/e/ir?t=wdr-20&#038;l=as2&#038;o=1&#038;a=0738418773" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li><li><a href="http://www.amazon.com/gp/product/0596007019?ie=UTF8&#038;tag=wdr-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0596007019">Java Cookbook, Second Edition</a><img src="http://www.assoc-amazon.com/e/ir?t=wdr-20&#038;l=as2&#038;o=1&#038;a=0596007019" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li></ul><p><center><iframe src="http://rcm.amazon.com/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=wdr-20&#038;o=1&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=10FE9736YVPPT7A0FBG2&#038;asins=0596007019" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe> <iframe src="http://rcm.amazon.com/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=wdr-20&#038;o=1&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=10FE9736YVPPT7A0FBG2&#038;asins=0738418773" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe><br /></center></p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/12/register-dtd-for-purexml-with-db2-9-7/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Upgrading DB2 LUW from 9.5 with XML Extender to 9.7</title><link>http://newpush.com/2009/07/upgrading-db2-luw-from-9-5-with-xml-extender-to-9-7/</link> <comments>http://newpush.com/2009/07/upgrading-db2-luw-from-9-5-with-xml-extender-to-9-7/#comments</comments> <pubDate>Sun, 19 Jul 2009 19:50:06 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[DB2]]></category> <category><![CDATA[DB2 9.5]]></category> <category><![CDATA[IBM]]></category> <category><![CDATA[pureXML]]></category> <category><![CDATA[XML]]></category><guid isPermaLink="false">http://www.wdream.com/?p=333</guid> <description><![CDATA[Summary The IBM documentation has good information on how to do the upgrade in general, and how to go through the preparation steps. Unfortunately the information about XML Extender is sparse, and all you get is ADM4104E One or more &#8230; <a href="http://newpush.com/2009/07/upgrading-db2-luw-from-9-5-with-xml-extender-to-9-7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<h4>Summary</h4><p>The IBM documentation has good information on how to do the upgrade in general, and how to go through the preparation steps.  Unfortunately the information about XML Extender is sparse, and all you get is</p><blockquote><p><code>ADM4104E One or more databases are enabled for XML Extender. You must remove the XML Extender functionality from the instance and databases before upgrading. Please refer to the DB2 Information Center for details on the steps to upgrade XML Extender including how to disable XML Extender in databases.</code></p></blockquote><p>This is misleading at best, since chances are that the XML extender was installed with the default DB2 install and never used, which was the case for the first upgrade I had to do.   You get this error message regardless of having any column, table, database, or instance using the XML Extender.  However, to find out how to get rid of the XML Extender is quite a challenge.</p><h4>Steps</h4><p>Follow the instructions here until step 6: <a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.qb.upgrade.doc/doc/t0054488.html">Upgrading a DB2 server with XML Extender to DB2 Version 9.7</a><br /> Once you&#8217;re at step 6, here are the details, assuming you have installed DB 9.5 to the default path.</p><ul><li>First, check that XML Extender is installed:<br /> <code><br /> db2ls -a -q -b /opt/ibm/db2/V9.5<br /> </code></li><li>Then proceed to uninstall XML extender:<br /> <code><br /> cd /path/to/install/media<br /> ./db2_deinstall -F XML_EXTENDER -b /opt/ibm/db2/V9.5<br /> </code></li></ul><p>This completes step 6 and you can proceed with the following step &#8211; step 7 &#8211; in the documentation.  Make sure you use the correct <code>db2iupdt</code> executable:<br /> <code><br /> /opt/ibm/db2/V9.5/instance/db2iupdt<br /> </code></p><h4>Caveat</h4><p>Even after fixing everything the upgrade tool complains about, you may still get odd error messages, that claim that you have not corrected the problems.  That is some odd behavior of the error message reporting in DB2.  For example, the front end was still complaining about VIEWs even though there weren&#8217;t any, and the back-end was still complaining about XML Extender even after it was uninstalled.  Thus, if you are sure that all the issues are in fact fixed, you can go ahead and force the upgrade with the &#8220;-F&#8221; option.</p><h4>References</h4><ul><li><a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.qb.upgrade.doc/doc/t0054488.html">Upgrading a DB2 server with XML Extender to DB2 Version 9.7</a></li><li><a href="http://www.idug.org/solutions-journal-content/upgrading-to-db2-for-luw-97.html">Upgrading to DB2 for LUW 9.7</a></li><li><a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp">DB2 9.1 Documentation</a></li><li><a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp">DB2 9.5 Documentation</a></li><li><a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp">DB2 9.7 Documentation</a></li><li><a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.admin.cmd.doc/doc/r0023670.html">db2ls, db2_deinstall</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/07/upgrading-db2-luw-from-9-5-with-xml-extender-to-9-7/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>XQuery and pureXML in DB2</title><link>http://newpush.com/2009/05/xquery-and-purexml-in-db2/</link> <comments>http://newpush.com/2009/05/xquery-and-purexml-in-db2/#comments</comments> <pubDate>Sun, 31 May 2009 18:47:59 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[DB2]]></category> <category><![CDATA[DB2 9.5]]></category> <category><![CDATA[IBM]]></category> <category><![CDATA[pureXML]]></category> <category><![CDATA[XQuery]]></category><guid isPermaLink="false">http://www.wdream.com/?p=299</guid> <description><![CDATA[I just came across the following two articles that have some good pointers for using the native XML capabilities of DB2: Using DB2 XQuery to extract data mining results stored as PMML: this article is a great introduction to XQuery &#8230; <a href="http://newpush.com/2009/05/xquery-and-purexml-in-db2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>I just came across the following two articles that have some good pointers for using the native XML capabilities of DB2:</p><ul><li><a href="http://www.ibm.com/developerworks/data/library/techarticle/dm-0905dataminingxquery/index.html?ca=drs-">Using DB2 XQuery to extract data mining results stored as PMML</a>: this article is a great introduction to XQuery and Predictive Model Markup Language (PMML), a language to describe data mining models and to enable the exchange of mining models between different data mining providers.</li><li><a href="http://www.ibm.com/developerworks/db2/library/techarticle/dm-0610nicola/">15 best practices for pureXML performance in DB2</a>: this article has valuable performance optimization advice that goes beyond the regular performance advice already covered in <a href="http://www.ibm.com/developerworks/aix/library/au-DB2AIXPERF.html">DB2 and AIX tuning essentials for DB2 performance</a>.</li></ul> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/05/xquery-and-purexml-in-db2/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Served from: newpush.com @ 2012-02-09 22:30:29 by W3 Total Cache -->
