SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 MSDTC
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

wided
Posting Yak Master

199 Posts

Posted - 06/12/2014 :  10:01:23  Show Profile  Reply with Quote
hello



i have 2 servers: server01 et server02 (SRBDRH7\EXIST)

I insert data on server02 from the trigger

what about this message?
MSDTC is not available on the serveur02(SRBDRH7\EXIST)

it worked well before the servers stop

it can be a service that has stopped, which?

thanks




wided
Posting Yak Master

199 Posts

Posted - 06/12/2014 :  10:03:18  Show Profile  Reply with Quote

the problem on SQL 2005

Go to Top of Page

webfred
Flowing Fount of Yak Knowledge

Germany
8760 Posts

Posted - 06/12/2014 :  10:27:16  Show Profile  Visit webfred's Homepage  Reply with Quote
http://stackoverflow.com/questions/633805/msdtc-service-on-sql-server-2005


Too old to Rock'n'Roll too young to die.
Go to Top of Page

wided
Posting Yak Master

199 Posts

Posted - 06/12/2014 :  12:54:42  Show Profile  Reply with Quote
it is a windows service?
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
36576 Posts

Posted - 06/12/2014 :  13:07:27  Show Profile  Visit tkizer's Homepage  Reply with Quote
You should not be using a distributed transaction inside a trigger as it participates in the transaction. If the insert on the second server fails, the whole transaction is rolled back on server 1. Is that what you want?

MSDTC is a Windows service.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

wided
Posting Yak Master

199 Posts

Posted - 06/13/2014 :  05:15:12  Show Profile  Reply with Quote
yes tkizer
Go to Top of Page

wided
Posting Yak Master

199 Posts

Posted - 06/13/2014 :  06:40:24  Show Profile  Reply with Quote
I have checked the servers are linked and MSDTC is enabled.

I found something else,
the query works fine if I run it from Query Analyzer, but i have the message if I call the trigger
Go to Top of Page

wided
Posting Yak Master

199 Posts

Posted - 06/13/2014 :  06:46:14  Show Profile  Reply with Quote
are there any services related to the trigger?
Go to Top of Page

wided
Posting Yak Master

199 Posts

Posted - 06/13/2014 :  06:48:22  Show Profile  Reply with Quote
trgger server to server?
Go to Top of Page

wided
Posting Yak Master

199 Posts

Posted - 06/13/2014 :  07:23:07  Show Profile  Reply with Quote
the query select .. from server2 works from

but , insert et update do not work
Go to Top of Page

wided
Posting Yak Master

199 Posts

Posted - 06/13/2014 :  08:14:47  Show Profile  Reply with Quote
the query select .. from server2 works from TRIGGER

but , insert et update do not work
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
36576 Posts

Posted - 06/13/2014 :  11:41:12  Show Profile  Visit tkizer's Homepage  Reply with Quote
I would recommend using transactional replication for this instead of a trigger.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

Bustaz Kool
Flowing Fount of Yak Knowledge

USA
1641 Posts

Posted - 06/13/2014 :  12:08:37  Show Profile  Reply with Quote
You would not need a transaction for the SELECT; only for the INSERT or UPDATE (or DELETE). Check this link to see if you have MSDTC set up properly on both servers: http://www.sqlvillage.com/Articles/Distributed%20Transaction%20Issue%20for%20Linked%20Server%20in%20SQL%20Server%202008.asp

HTH



Too often we enjoy the comfort of opinion without the discomfort of thought. - John F. Kennedy
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000