apirnia
asked on
Trigger and MSDTC issue
I have a very simple Trigger on a high traffic indexed table on a SQL Server 2000 Enterprise server.
The trigger goes like this:
CREATE TRIGGER tr_AnswerBankOrdersInserte d
on AnswerBank
FOR INSERT
AS
BEGIN
INSERT INTO AnswerBankOrdersInserted (fkUserOrder, iRevision)
Select Distinct fkUserOrder, iRevision from Inserted
END
All it's supposed to do is to grab 2 of the 6 columns in the "AnswerBank" table and "ON INSERT" insert them into a
new table called AnswerBankOrdersInserted.
This trigger works perfectly when I try to insert data with a Select Into query or any other simple direct query,
however it fails when I try to Insert data from a stored procedure.
I get the following error:
[SQL Server]MSDTC on server 'XXXXXX' is unavailable.
I get this error when I try to execute the stored procedure from a web page.
I'm still not 100% sure that the issue is from the trigger, however thats the only thing I can point to at this moment.
Thanks for any help.
The trigger goes like this:
CREATE TRIGGER tr_AnswerBankOrdersInserte
on AnswerBank
FOR INSERT
AS
BEGIN
INSERT INTO AnswerBankOrdersInserted (fkUserOrder, iRevision)
Select Distinct fkUserOrder, iRevision from Inserted
END
All it's supposed to do is to grab 2 of the 6 columns in the "AnswerBank" table and "ON INSERT" insert them into a
new table called AnswerBankOrdersInserted.
This trigger works perfectly when I try to insert data with a Select Into query or any other simple direct query,
however it fails when I try to Insert data from a stored procedure.
I get the following error:
[SQL Server]MSDTC on server 'XXXXXX' is unavailable.
I get this error when I try to execute the stored procedure from a web page.
I'm still not 100% sure that the issue is from the trigger, however thats the only thing I can point to at this moment.
Thanks for any help.
ASKER
I tried that, but it tells me that it is unable to start it and gives me this number:
1073737712
1073737712
ASKER
That was the same error I was getting. I tried both methodes and non of them worked. Basicly after the steps I could not get that service started.
check the msdtc. log file in the system32 folder
and rt click the properties and c what all permissions the logon account name which u gave in msdtc service property(log on tab) has.
it shudve the following permissions.
Read & Execute
Read
Write
and rt click the properties and c what all permissions the logon account name which u gave in msdtc service property(log on tab) has.
it shudve the following permissions.
Read & Execute
Read
Write
Did you try the two methods given on the site
ASKER
Yes I tried both methodes and non of them worked. The user on that service is Network Service and it has Full permissions on the msdtc.log file .
ASKER
I figured it out:
CAUSE
This behavior occurs if the Distributed Transaction Coordinator (DTS) service is disabled or if network DTC access is disabled. By default, network DTC access is disabled in Windows Server 2003.
WORKAROUND
To work around this behavior, install network DTC access on both servers:
1. Click Start, and then click Control Panel.
2. Click Add or Remove Programs, and then click Add/Remove Windows Components.
3. In the Components box, click Application Server, and then click Details.
4. Click to select the Enable network DTC access check box, and then click OK.
5. Click Next, and then follow the instructions that appear on the screen to complete the installation process.
6. Stop and then restart the Distributed Transaction Coordinator service.
7. Stop and then restart any resource manager services that participates in the distributed transaction (such as Microsoft SQL Server or Microsoft Message Queue Server).
http://support.microsoft.com/kb/816701
CAUSE
This behavior occurs if the Distributed Transaction Coordinator (DTS) service is disabled or if network DTC access is disabled. By default, network DTC access is disabled in Windows Server 2003.
WORKAROUND
To work around this behavior, install network DTC access on both servers:
1. Click Start, and then click Control Panel.
2. Click Add or Remove Programs, and then click Add/Remove Windows Components.
3. In the Components box, click Application Server, and then click Details.
4. Click to select the Enable network DTC access check box, and then click OK.
5. Click Next, and then follow the instructions that appear on the screen to complete the installation process.
6. Stop and then restart the Distributed Transaction Coordinator service.
7. Stop and then restart any resource manager services that participates in the distributed transaction (such as Microsoft SQL Server or Microsoft Message Queue Server).
http://support.microsoft.com/kb/816701
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
START > SETTINGS > CONTROL PANEL > ADMINISTRATIVE TOOLS > SERVICES.
Find the service called 'Distributed Transaction Coordinator' and RIGHT CLICK (on it and select) > Start.