|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Can I populate a temp table by calling a proc on a linked server?CREATE TABLE #tmp(CustID int) GO INSERT #tmp(CustID) EXEC MyRemoteServer.RemoteDB.dbo.sp_GetCustIDs ....and I get this.... Server: Msg 7391, Level 16, State 1, Line 6 The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction. Server: Msg 8522, Level 18, State 1, Line 6 Distributed transaction aborted by MSDTC. OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ITransactionJoin::JoinTransaction returned 0x8004d00a]. [OLE/DB provider returned message: New transaction cannot enlist in the specified transaction coordinator. ] I have done some research into this and I made sure MSDTC service was running on both servers and that both Windows 2003 servers had MSDTC enabled. But I still get this MSDTC error. Someone told me that you cannot populate a temp table this way. Is this true? Or is there some server configuration change I can make to make it work? If it can't be done what are my alternatives? I am prohibited by our internal DB standards from writing any linked server joins. Do I just create a perm table to insert into? Thanks for any insights. Dave Hi
It would be simple enough to see if a permanent table would work! If not check what the remote procedure is doing. John Show quote "Dave" <D***@discussions.microsoft.com> wrote in message news:699F9967-8709-43B9-A9BA-8BD7C0949BB6@microsoft.com... > I'm trying to do this: > > CREATE TABLE #tmp(CustID int) > GO > INSERT #tmp(CustID) > EXEC MyRemoteServer.RemoteDB.dbo.sp_GetCustIDs > > ...and I get this.... > > Server: Msg 7391, Level 16, State 1, Line 6 > The operation could not be performed because the OLE DB provider > 'SQLOLEDB' > was unable to begin a distributed transaction. > Server: Msg 8522, Level 18, State 1, Line 6 > Distributed transaction aborted by MSDTC. > OLE DB error trace [OLE/DB Provider 'SQLOLEDB' > ITransactionJoin::JoinTransaction returned 0x8004d00a]. > [OLE/DB provider returned message: New transaction cannot enlist in the > specified transaction coordinator. ] > > I have done some research into this and I made sure MSDTC service was > running on both servers and that both Windows 2003 servers had MSDTC > enabled. > But I still get this MSDTC error. > > Someone told me that you cannot populate a temp table this way. Is this > true? Or is there some server configuration change I can make to make it > work? > > If it can't be done what are my alternatives? I am prohibited by our > internal DB standards from writing any linked server joins. Do I just > create > a perm table to insert into? > > Thanks for any insights. > Dave > > > > |
|||||||||||||||||||||||