Problems aborting transaction across > 1 database

Problems aborting transaction across > 1 database

Post by John » Sun, 21 Jan 2001 04:08:37



Has anyone seen this before?

I'm running SQL 7.0 with SvcPack 3 on advanced windows 2000 server.
I'm using OLEDB C++ templates to access two databases.

The steps I take are:
1 - open the CDatasource
2 - create and open two CSessions to the datasource
3 - create a transaction using the DTC Transaction Dispenser
4 - enlist both sessions into the transaction
5 - execute an "Insert" command for db 1
6 - execute an "Insert" command for db 2
7 - abort the transaction
8 - unlist the sessions from the transactions

When I abort the transaction via the ITransaction interface (step 7), I get a
successful status from the abort C++ call, but SQL generates an error:

"Error while undoing logged operation in database XYZ. Error at log record ID
(7:349:5).."
"Error: 3314, Severity: 21, State: 4"
"The log for database XYZ is not available.."

Step 8 returns an E_FAIL error.

If I change the order of enlisting the sessions into the transaction (step 4), I
DO NOT get the error. In addition, for some databases I never see the error.

It seems to have something to do with the order of enlistment, but I'm not sure
why????
                                   Thanks!