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
 

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







Preguntas similares