tomcom
asked on
DISTRIBUTED TRANSACTION HELP
I try to use disrtibuted transaction. First,I use MSDASQL successfull:
set XACT_ABORT on
set ANSI_NULL_DFLT_ON on
set ANSI_WARNINGS on
BEGIN DISTRIBUTED TRANSACTION
select * from OPENDATASOURCE('MSDASQL',' DRIVER={SQ L Server};SERVER=192.168.2.1 ;UID=sa;PW D=PASSWORD ;').pubs.d bo.jobs
commit tran
Then I try to use SQLOLEDB, But failure:
set XACT_ABORT on
set ANSI_NULL_DFLT_ON on
set ANSI_WARNINGS on
BEGIN DISTRIBUTED TRANSACTION
select * from OPENDATASOURCE('SQLOLEDB', 'Data Source=192.168.2.1;User ID=sa;Password=PASSWORD'). pubs.dbo.j obs
commit tran
I get the following error message:
The operation could not be performed because the OLE DB
provider 'SQLOLEDB' was unable to begin a distributed
transaction.
[OLE/DB provider returned message: New transaction cannot
enlist in the specified transaction coordinator. ]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
ITransactionJoin::JoinTran saction returned 0x8004d00a].
but I run the code use SQLOLEDB without DISTRIBUTED TRANSACTION success:
select * from OPENDATASOURCE('SQLOLEDB', 'Data Source=192.168.2.1;User ID=sa;Password=PASSWORD'). pubs.dbo.j obs
WHY? Please help me!
set XACT_ABORT on
set ANSI_NULL_DFLT_ON on
set ANSI_WARNINGS on
BEGIN DISTRIBUTED TRANSACTION
select * from OPENDATASOURCE('MSDASQL','
commit tran
Then I try to use SQLOLEDB, But failure:
set XACT_ABORT on
set ANSI_NULL_DFLT_ON on
set ANSI_WARNINGS on
BEGIN DISTRIBUTED TRANSACTION
select * from OPENDATASOURCE('SQLOLEDB',
commit tran
I get the following error message:
The operation could not be performed because the OLE DB
provider 'SQLOLEDB' was unable to begin a distributed
transaction.
[OLE/DB provider returned message: New transaction cannot
enlist in the specified transaction coordinator. ]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
ITransactionJoin::JoinTran
but I run the code use SQLOLEDB without DISTRIBUTED TRANSACTION success:
select * from OPENDATASOURCE('SQLOLEDB',
WHY? Please help me!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Do you need any more help with this question?