Discussion:
MSDB2 Client exception HY000 SQLCODE -343
(too old to reply)
Joerg Fischer
2007-01-22 21:13:54 UTC
Permalink
Hi,

Given the code within a COM+ ServicedComponent

adapt.Connection = conn;
conn.Open();
conn.EnlistDistributedTransaction((ITransaction)ContextUtil.Transaction);
adapt.Update(ds);

when this is executed, I receive the following error:

-SQLSTATE HY000, SQLCODE -343. SQLSTATE: HY000, SQLCODE -343

Can anyone give me an enlightment on that?

Thank you very much!

sincerely

Joerg Fischer
Neil Pike
2007-01-22 22:36:06 UTC
Permalink
Joerg,

Well, the 343 means the below, if that helps....

What version/platform for DB/2 are you trying to connect to? Someone else got
a similar error when they pointed the driver at a DB2 Connect server, as
opposed to straight at the tcp-ip port the DB2 DRDA listener was listening on,
on the mainframe.

What version of HIS / DB2 driver are you using?

------------------
SQL0343N The column names are required for the recursive common table
expression name.
Explanation:
The recursive common table expression name must include the specification of
the column names following the identifier of the common table expression.

The statement cannot be processed.

User Response:
Add column names following the identifier of the common table expression.

sqlcode: -343

sqlstate: 42908


Neil Pike. Protech Computing Ltd
Microsoft SNA/HIS MVP
https://mvp.support.microsoft.com/communities/mvp.aspx
Andrew McLaren
2007-01-22 22:51:15 UTC
Permalink
Post by Joerg Fischer
Given the code within a COM+ ServicedComponent
adapt.Connection = conn;
conn.Open();
conn.EnlistDistributedTransaction((ITransaction)ContextUtil.Transaction);
adapt.Update(ds);
-SQLSTATE HY000, SQLCODE -343. SQLSTATE: HY000, SQLCODE -343
Can anyone give me an enlightment on that?
Hi Joerg

I can't tell you the root cause of your error, but here's some background
info. "SQLSTATE HY000" means that the error code is defined by the software
vendor (as opposed to the universal, ANSI-defined SQLSTATE/SQLCODE error
codes). So, to find out what SQLCODE -343 means, we need to look at the
Microsoft-supplied documentation. In this case, the documentation is the
db2oledb.h file, in the HIS SDK :-), at <HIS
directory>\SDK\include\db2oledb.h. In this file, we find:

#define DB2OLEDB_DDM_PRCCNVRM (DB2OLEDB_DDM_ERROR_START-87) /* -343 */

So "SQLCODE -343" is telling us that when the Ole DB Provider tried to
communicate with DB2, it hit a PRCCNVRM error at the DDM layer ("DDM" is
Distributed Data Management, an IBM-defined protocol for talking to
databases - but, um, you probably already knew that). DDM errors like
PRCCNVRM are defined in IBM's publication SC21-9526 "DDM Architecture:
Reference". PRCCNVRM means there was a distributed protocol error. This
could be something very subtle in the semantics of the transaction; or, it
could be something as simple as having the wrong IP address or TCP Port for
the DRDA Server. If you use the SNA Trace utility in HIS to get a DDM-layer
trace, there will be an Exception record returned to HIS with the PRCCNVRM
error; thsi will contain a two-byte field with a more precise sub-qualifier
to teh PRCCNVRM error.

But maybe start by verifying the basic communications setup between the Ole
DB Provider and DB2. Looking through the archives, another guy got this
error message when he specified the IP address of the DB2 Connect Gateway,
instead of the DB2 server itself (see
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1101094&SiteID=1)

Other folks might have extra info; I hope this helps a bit!

Tschuess :-)
Andrew
--
Andrew McLaren
Sydney, Australia
amclaren (at) ieee dot org
Joerg Fischer
2007-01-24 13:57:30 UTC
Permalink
Hi there,

Thanks for the quick responses!

The problem is definitely originating from the Distributed Transaction
Management - so this hint was correct!

Sincerely

Joerg Fischer
Post by Joerg Fischer
Hi,
Given the code within a COM+ ServicedComponent
adapt.Connection = conn;
conn.Open();
conn.EnlistDistributedTransaction((ITransaction)ContextUtil.Transaction);
adapt.Update(ds);
-SQLSTATE HY000, SQLCODE -343. SQLSTATE: HY000, SQLCODE -343
Can anyone give me an enlightment on that?
Thank you very much!
sincerely
Joerg Fischer
Joerg Fischer
2007-02-01 15:10:39 UTC
Permalink
Hi,

Even though I soroughly investigated the DDM Service, I still was not able
to finally track down the issue. Also, I checked a couple of KB articles
already.

Can anyone give me a sort of a "cookbook" on how to track the issue further?

THank you very much!

Sincerely

Joerg Fischer
Post by Joerg Fischer
Hi there,
Thanks for the quick responses!
The problem is definitely originating from the Distributed Transaction
Management - so this hint was correct!
Sincerely
Joerg Fischer
Post by Joerg Fischer
Hi,
Given the code within a COM+ ServicedComponent
adapt.Connection = conn;
conn.Open();
conn.EnlistDistributedTransaction((ITransaction)ContextUtil.Transaction);
adapt.Update(ds);
-SQLSTATE HY000, SQLCODE -343. SQLSTATE: HY000, SQLCODE -343
Can anyone give me an enlightment on that?
Thank you very much!
sincerely
Joerg Fischer
Stephen Jackson [MSFT]
2007-02-06 22:43:34 UTC
Permalink
Joerg,

We typically use the SnaTrace utility to capture DB2 Network Library traces
(to make it simple, enable all of the options under each trace tab) and we
get a network trace (Network Monitor, Etherreal, Sniffer, etc.) of the
traffic between the system running the DB2 provider and the DB2 system.

Once all of the traces are enabled, reproduce the problem. After the error
occurs, stop the traces (click Clear All Traces in the SnaTrace dialog).

We usually need to look at the traces to see what might be happening. Seeing
your connection string might be useful as well.

You could open a case with the Microsoft HIS Support Team to get the traes
analyzed.

Thanks...
--
Stephen Jackson
Microsoft® HIS Support

Please do not send e-mail directly to this alias. This alias is for
newsgroup purposes only. This posting is provided "AS IS"
with no warranties, and confers no rights.
Post by Joerg Fischer
Hi,
Even though I soroughly investigated the DDM Service, I still was not able
to finally track down the issue. Also, I checked a couple of KB articles
already.
Can anyone give me a sort of a "cookbook" on how to track the issue further?
THank you very much!
Sincerely
Joerg Fischer
Post by Joerg Fischer
Hi there,
Thanks for the quick responses!
The problem is definitely originating from the Distributed Transaction
Management - so this hint was correct!
Sincerely
Joerg Fischer
Post by Joerg Fischer
Hi,
Given the code within a COM+ ServicedComponent
adapt.Connection = conn;
conn.Open();
conn.EnlistDistributedTransaction((ITransaction)ContextUtil.Transaction);
adapt.Update(ds);
-SQLSTATE HY000, SQLCODE -343. SQLSTATE: HY000, SQLCODE -343
Can anyone give me an enlightment on that?
Thank you very much!
sincerely
Joerg Fischer
Loading...