Re: UPDATE Statement Involving Tables in Different Databases



Altemir (david.altemir@xxxxxxxxx) writes:
Mark's suggestion worked great when I ran it on a simple test, but I'm
having problems applying this methodology to my real (more complex)
application. I get the following error when running the script from
Query Analyzer:

Server: Msg 7391, Level 16, State 1, Line 1
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::JoinTransaction returned 0x8004d00a].

Note that both databases reside on the same server and I checked
Distributed Transaction Coordinator (DTC) to make sure that it's
running. What else about this kind of distributed UPDATE statement
would cause such an error?

If the databases are on the same instance of SQL Server, there is no
need for any distributed transaction. If you get this message, you
have somehow introduced a four-part notation into the mix.

If the databases are on different instances, you need one, even if the
instance are on the same machine.

What applies to your case? What exact syntax did you use?



--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Server: Msg 7391, (..) unable to begin a distributed transaction.
    ... was unable to begin a distributed transaction. ... OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ... Since I'm not sure the admins of the other SQL Server have done what's on ...
    (microsoft.public.sqlserver.programming)
  • Re: UPDATE Statement Involving Tables in Different Databases
    ... If the databases are on the same instance of SQL Server, ... If the databases are on different instances, you need one, even if the ... to begin a distributed transaction" error as I stated before. ... Status.dbo.tblPOBaselineDueDates INNER JOIN MFG.dbo.PURC_ORDER_LINE ON ...
    (comp.databases.ms-sqlserver)
  • Re: Problem with executing Distributed Transactions on Linked Servers
    ... > I have a Linked Server i.e. my SQL Server 2000 is Linked to the Oracle ... > 'MSDAORA' was unable to begin a distributed transaction. ... > OLE DB error trace [OLE/DB Provider 'MSDAORA' ...
    (microsoft.public.sqlserver.server)
  • Re: why>?
    ... On your desktop-- you'll be running SQL Server behind the scenes. ... it isn't risky to allow end users to create databases. ... it is no more risky than giving you the ability to create spreadsheets. ... I'm not saying that Oracle and IBM are going away. ...
    (microsoft.public.excel)
  • Re: Please answer my queries for fresh Installation
    ... Moving SQL Server Databases ... Using WITH MOVE in a Restore to a New Location with Detach/Attach ... Disaster Recovery Articles for SQL Server ...
    (microsoft.public.sqlserver.server)