SP de Otro server Segunda Parte...

18/07/2005 - 16:45 por Gabriel South | Informe spam
Hola a todos,

Consegui ejecutar una Stored procedure de otro servidor, despues de declarar
un Linked Server...

Hasta alli todo bien, hasta que intente grabar el resultado de la SP en una
tabla temporal, y surgio el siguiente error sql:

Server: Msg 7391, Level 16, State 1, Line 35
The operation could not be performed because the OLE DB provider 'SQLOLEDB'
was unable to begin a distributed transaction.
[OLE/DB provider returned message: New transaction cannot enlist in the
specified transaction coordinator. ]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
ITransactionJoin::JoinTransaction returned 0x8004d00a].

A que se debe ese error?... parece que el SP inicia un Transaccion
distribuida ???

Gracias, Gabriel.


Sigue:

pelas procedures
create table #r ( status char(1) NULL,
mensagem varchar(255) NULL,
ano smallint NULL,
numero int NULL,
negocio char(2) NULL,
atividade char(3) NULL,
cd_emp tinyint NULL,
cd_est tinyint NULL,
Cliente int NULL,
NomeFantasia char(40) NULL,
Container char(15) NULL,
TipoDocumentoEntrada tinyint NULL,
DocumentoEntrada char(18) NULL,
Embarcacao char(25) NULL,
Viagem char(25) NULL,
LocalOrigemDestino char(30) NULL,
TipodocumentoSaida tinyint NULL,
DocumentoSaida char(20) NULL,
InvoiceFaturaCliente char(20) NULL,
ReferenciaCliente char(40) NULL,
RecintoAlfandegado char(7) NULL,
OrdemColeta int NULL,
NotaFiscalClienteTipo char(3) NULL,
NotaFiscalClienteSerie char(3) NULL,
NotaFiscalClienteNumero int NULL,
SolicitacaoVazio int NULL,
ReservaConsolidador char(30) NULL,
ReservaArmador char(30) NULL,
LocalAtracacao int NULL )

Insert into #r
exec [testes\ger].gerenciador.dbo.GerprOrdemServico
@funcao='S',
@usuario='GERENCIADOR',
@sistema='AVG',
@processo='I',
@referenciacliente='X XXXXXXX',
@cliente,
@cd_emp=1,
@cd_est=1

Preguntas similare

Leer las respuestas

#1 Alejandro Mesa
18/07/2005 - 17:11 | Informe spam
Asegurate de tener MS DTC service levantado en ambos servers. Ve si esto te
sirve:

INF: Troubleshooting Linked Server Error 7391
http://support.microsoft.com/defaul...-us;306212


AMB

"Gabriel South" wrote:

Hola a todos,

Consegui ejecutar una Stored procedure de otro servidor, despues de declarar
un Linked Server...

Hasta alli todo bien, hasta que intente grabar el resultado de la SP en una
tabla temporal, y surgio el siguiente error sql:

Server: Msg 7391, Level 16, State 1, Line 35
The operation could not be performed because the OLE DB provider 'SQLOLEDB'
was unable to begin a distributed transaction.
[OLE/DB provider returned message: New transaction cannot enlist in the
specified transaction coordinator. ]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
ITransactionJoin::JoinTransaction returned 0x8004d00a].

A que se debe ese error?... parece que el SP inicia un Transaccion
distribuida ???

Gracias, Gabriel.


Sigue:

pelas procedures
create table #r ( status char(1) NULL,
mensagem varchar(255) NULL,
ano smallint NULL,
numero int NULL,
negocio char(2) NULL,
atividade char(3) NULL,
cd_emp tinyint NULL,
cd_est tinyint NULL,
Cliente int NULL,
NomeFantasia char(40) NULL,
Container char(15) NULL,
TipoDocumentoEntrada tinyint NULL,
DocumentoEntrada char(18) NULL,
Embarcacao char(25) NULL,
Viagem char(25) NULL,
LocalOrigemDestino char(30) NULL,
TipodocumentoSaida tinyint NULL,
DocumentoSaida char(20) NULL,
InvoiceFaturaCliente char(20) NULL,
ReferenciaCliente char(40) NULL,
RecintoAlfandegado char(7) NULL,
OrdemColeta int NULL,
NotaFiscalClienteTipo char(3) NULL,
NotaFiscalClienteSerie char(3) NULL,
NotaFiscalClienteNumero int NULL,
SolicitacaoVazio int NULL,
ReservaConsolidador char(30) NULL,
ReservaArmador char(30) NULL,
LocalAtracacao int NULL )

Insert into #r
exec [testes\ger].gerenciador.dbo.GerprOrdemServico
@funcao='S',
@usuario='GERENCIADOR',
@sistema='AVG',
@processo='I',
@referenciacliente='X XXXXXXX',
@cliente,
@cd_emp=1,
@cd_est=1







Respuesta Responder a este mensaje
#2 Maxi
18/07/2005 - 17:12 | Informe spam
Hola, hace unos dias alguien pregunto lo mismo y aca te envio el hilo:




Muchas Gracias Antonio, revise esa configuración y funciono..., por lo que
veo, nunca utilizamos transacciones distribuidas, a pesar de consultar
servidores externos y linkeados..., pero bueno..., siempre se aprende algo
nuevo..., gracias nuevamente...
Saludos.

Atte.,
Carlo Sorrel
"Antonio Soto" <antoniosotorodriguezARROBAhotmail.comQUITAR> escribió en el
mensaje news:
Hola Carlos.

Como ves en el error, esa operación requiere de una transacción
distribuida para realizarse correctamente. Es posible que sea por el
select ...into pero ahora no puedo comprobarlo. De todos modos comprueba
con sp_configure el valor del parámetro "remote proc trans". Si ese
parámetro está 1, está exigiendo transacciones distribuidas para las
operaciones entre servidores. Si no es así (está a 0),m quiere decir que
esas operaciones que estás realizando necesitan estar en una transacción
distribuida, por lo que tendrás que asegurarte de tener arrancado el
servidio MSDTC en ambos servidores

Saludos
email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida