<docbook><section><title>OracleConfigXASupport</title><para> </para><bridgehead class="http://www.w3.org/1999/xhtml:h2">Configuring Oracle for XA support </bridgehead>
<para>XA support has been tested against Oracle version 9i and 10g</para><bridgehead class="http://www.w3.org/1999/xhtml:h3">Granting SELECT Privilege on V$XATRANS$ &amp; DBA_PENDING_TRANSACTIONS Views</bridgehead>
<para>You must grant SELECT privilege to the V$XATRANS$ view for all Oracle accounts that XA applications will use.
 Otherwise, xa_recover will fail, in the event that TM needs to perform a recovery.
 If the view does not already exist in your Oracle installation, it can be manually loaded using the following SQL script which should be included in your Oracle installation:</para><programlisting>$ORACLE_HOME/rdbms/admin/xaview.sql
</programlisting><para> The example below shows an extract from an Oracle XA Library trace file.
 Oracle returns error <emphasis>ORA-00942 : table or view does not exist</emphasis>, because user scott does not have the necessary SELECT privilege on the V$XATRANS$ view.</para><programlisting>ORACLE XA: Version 10.1.0.0.0. RM name = &#39;Oracle_XA&#39;.

113956.2352:536.536.1:
xaoopen: xa_info=ORACLE_XA+Threads=true+SesTm=60+Acc=P/scott/tiger+DB=DB01BA5BF8+SQLNET=ORCL+DbgFl=0x1+LogDir=c:/,rmid=1,flags=0x0

113956.2352:536.536.1:
xaolgn_help: version#: 168821248 banner: Personal Oracle Database 10g Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options

113956.2352:536.536.1:
xaoopen: return 0

113959.2352:536.536.1:
xaorecover: xids=0xf8f8f8, count=10, rmid=1, flags=0x1000000

113959.2352:536.536.1:
ORA-00942: table or view does not exist

113959.2352:536.536.1:
xaorecover: xaofetch rtn -3.

113959.2352:536.536.1:
xaoclose: xa_info=DSN=au49-ora10-carlv;UID=scott;PWD=tiger;+DB=DB01BA5BF8, rmid=1769209857, flags=0x0

113959.2352:536.536.1:
xaoclose: rtn 0
</programlisting><para> The syntax for adding the grant privilege to the &#39;scott&#39; user is:</para><programlisting>grant select on V$XATRANS$ to scott;
</programlisting><para> In addition, the &quot;ORA-00942: table or view does not exist&quot; error also occurs if select privileges are not granted on the <computeroutput>DBA_PENDING_TRANSACTIONS</computeroutput> view, requiring the following command to be executed as a DBA user:</para><programlisting>GRANT SELECT ON DBA_PENDING_TRANSACTIONS TO PUBLIC
</programlisting><para>  </para></section></docbook>