dbTalk Databases Forums  

Errore su transazione con trigger??

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Errore su transazione con trigger?? in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andrea Canegrati
 
Posts: n/a

Default Errore su transazione con trigger?? - 08-05-2003 , 02:21 AM






Ciao a tutti, devo eseguire una INSERT su un db in remoto...visto che non lo
uso frequentemente utilizzo la funzione OPENDATASOURCE invece di linkare il
server. Tutto funziona alla perfezione..ma quando sposto il codice
all'interno di un Trigger (che lancio dopo l'inserimento in un altra tabella
su un altro db) mi dice che non puù aggiungere un'altra transazione alla
code (Errore 7391).....

Che può essere?? Il servizio DTC è avviato su entrambi i server....AIUTO!!!

P.S.: premetto che non sono un grande esperto di transact-sql....




Reply With Quote
  #2  
Old   
Andrea Canegrati
 
Posts: n/a

Default Re: Errore su transazione con trigger?? - 08-07-2003 , 03:23 AM






Grazie mille....comunque ho dato un occhio alla documentazione ed
effettivamente non è possibile perchè avendo già una transazione aperta non
posso aprirne una in remoto...

Grazie ancora....

"Erland Sommarskog" <sommar (AT) algonet (DOT) se> ha scritto nel messaggio
news:Xns93D06BAAA27EYazorman (AT) 127 (DOT) 0.0.1...
Quote:
[posted and mailed, per favore respondere in news]

Andrea Canegrati (acanegrati (AT) enter (DOT) it) writes:
Ciao a tutti, devo eseguire una INSERT su un db in remoto...visto che
non lo uso frequentemente utilizzo la funzione OPENDATASOURCE invece di
linkare il server. Tutto funziona alla perfezione..ma quando sposto il
codice all'interno di un Trigger (che lancio dopo l'inserimento in un
altra tabella su un altro db) mi dice che non puù aggiungere un'altra
transazione alla code (Errore 7391).....

Che può essere?? Il servizio DTC è avviato su entrambi i
server....AIUTO!!!

In Books Online, cerca per 7391, e troverai un articolo de questa
errore. Questa è il testo in inglese:

Message Text
The operation could not be performed because the OLE DB provider '%ls'
was unable to begin a distributed transaction.

Explanation
This error can occur while processing an INSERT, UPDATE, or DELETE
statement inside an explicit or implicit transaction. This indicates
that the OLE DB provider does not support distributed transactions,
which is needed for data modification statements inside an explicit or
implicit transaction. A data modification statement can be executed
against such a provider only in the case where the statement is a
transaction by itself.

Action
Verify that the OLE DB provider specified supports distributed
transactions. If the provider does not support distributed
transactions, rewrite the data modification statement not to use
distributed transactions.

Sembra che non è possibilie per te di usare un trigger in
questo caso. (Quando sei in un trigger, c'è sempre un tranazione.)


--
Erland Sommarskog, SQL Server MVP, sommar (AT) algonet (DOT) se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.