Enabling pgxalib.dll logging in msdtc

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Enabling pgxalib.dll logging in msdtc
Date: 2014-07-01 09:33:01
Message-ID: 53B2804D.50107@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi all

Just for the information of the wider world, if you want to enable
logging in pgxalib.dll under MSDTC.EXE to trace psqlODBC's XA
transactions you can't just use the mylog parameter. Enabling ODBC
logging won't help either.

You must instead create the following registry key:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL]
"MsdtcLog"="1"

If your app is 32-bit on a 64-bit system (i.e. SysWow64) then you must
NOT create the key under \SysWow64\, it must be under the regular 64-bit
registry tree.

Then create C:\pgdtclog (it's hard coded to that path) and make sure
it's writable by NETWORKSERVICE. Which it should be by default.

If you're debugging MSDTC you're likely to also want the MSDTC logs.
These are separate. MSDTC produces a binary log that must be decoded
using a separate utility invoked via a batch file. See:

http://msdn.microsoft.com/en-us/library/ms684379(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/ms678917(v=vs.85).aspx

for details.

I found that only the tracefmt.exe from the Windows 7.1 SDK worked; the
one in Visual Studio Express 2012 failed to process the MSDTC logs on
the Win2k8 R2 system I was testing on.

Please feel free to add any/all of this to the documentation if desired.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Browse pgsql-odbc by date

  From Date Subject
Next Message Craig Ringer 2014-07-01 10:15:14 installer\Make.bat bitrotted
Previous Message Heikki Linnakangas 2014-06-27 07:20:02 Re: Git history author/committer fields (was Re: msdtc with 32-bit app fails to resolve in-doubt or not-notifed transactions)