DTC: which one is valid DTC?

DTC: which one is valid DTC?

Post by Wonhyuk William Chun » Sat, 20 Mar 1999 04:00:00



Hi all,

What is the correct way to use MSDTC?

Let's assume that I have a correct linked server for server201.

1)
begin distributed tran
    update sales set qty = qty /2 where title_id = 'pc8888'
    exec server201.pubs.dbo.procA
commit

2)
begin distributed tran
    update sales set qty = qty /2 where title_id = 'pc8888'
    update server201.pubs.dbo.sales set qty = qty/2 where title_id =
'pc8888'
commit

3)
set xact_abort on
begin tran
    update sales set qty = qty /2 where title_id = 'pc8888'
    update server201.pubs.dbo.sales set qty = qty/2 where title_id =
'pc8888'
commit

The reason why I am asking this question:
1. Should I have to mention "set xact_abort on" to use DTC?
2. Should I have to use remote stored proc only to use DTC?
3. Is 3) also guarantee 2 Phase commit also?

Thanks in advance,
Wonhyuk William Chung

 
 
 

DTC: which one is valid DTC?

Post by Ofir » Wed, 28 Apr 1999 04:00:00


Hi

Option 1)    (with two dots between the database name and the SP name)

Quote:>begin distributed tran
>    update sales set qty = qty /2 where title_id = 'pc8888'
>    exec server.DatabaseName..SP_Name
>commit Tran

---------------------------------
Quote:>1. Should I have to mention "set xact_abort on" to use DTC?

If you like to execute the rollback when there is a RaisError action, but
the dtc do not depends on it
----------------------------------
Quote:>2. Should I have to use remote stored proc only to use DTC?

Yes
----------------------------------
Quote:>3. Is 3) also guarantee 2 Phase commit also?

Yes, if the DTC is up

>Hi all,

>What is the correct way to use MSDTC?

>Let's assume that I have a correct linked server for server201.

>1)
>begin distributed tran
>    update sales set qty = qty /2 where title_id = 'pc8888'
>    exec server201.pubs.dbo.procA
>commit

>2)
>begin distributed tran
>    update sales set qty = qty /2 where title_id = 'pc8888'
>    update server201.pubs.dbo.sales set qty = qty/2 where title_id =
>'pc8888'
>commit

>3)
>set xact_abort on
>begin tran
>    update sales set qty = qty /2 where title_id = 'pc8888'
>    update server201.pubs.dbo.sales set qty = qty/2 where title_id =
>'pc8888'
>commit

>The reason why I am asking this question:
>1. Should I have to mention "set xact_abort on" to use DTC?
>2. Should I have to use remote stored proc only to use DTC?
>3. Is 3) also guarantee 2 Phase commit also?

>Thanks in advance,
>Wonhyuk William Chung


 
 
 

1. Does SQL 7 DTC work with MTS 2.0 DTC

My computers are

NT Server 4.0 Chinese Edition + SP3 + MTS 2.0
NT Server 4.0 Enterprise + SP4 + MSCS 1.0 + SQL 7.0 Beta 3
NT Server 4.0 English Edition(code page changed to TChinese) + SP4 + SQL 6.5

When components requiring a transaction in MTS  connect to SQL 7 Beta3, the
error code will appear

"Failed to enlist in DTC: SQL state S1010, native error 0, error message
[Microsoft][ODBC SQL Server Driver]Function sequence error."

But if i change to use SQL 6.5. It works. If i set the components not
support transaction, and connect to SQL 7, it works.
Is there something wrong with DTC?
Thank you

2. Senior Oracle Applications Developer

3. directing DTC trace to DTC console ?

4. how to write/update/select use DBD:Sybase?

5. How can I monitor DTC transaction in MS DTC Administrative Console?

6. How do I get files in a directory into a TSQL Array?

7. Excel and DTC SQL 7.0

8. Databases under MS Windows

9. MS DTC

10. MS DTC / Cluster

11. Primary DTC...