Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/09/2011, 10:14
potus
 
Fecha de Ingreso: noviembre-2008
Mensajes: 8
Antigüedad: 15 años, 6 meses
Puntos: 0
Pregunta DTS en Stored Procedure

Hola amigos del foro.

Les comento mi problema, resulta que estoy ejecutando un DTS desde un SP, el DTS toma datos de una base Access y los Copia en una Base SQL Server.

Si ejecuto el DTS directamente funciona, pero si lo hago desde el SP me arroja el siguiente error.



DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSExecuteSQLTask_1
DTSRun OnStart: DTSStep_DTSDataPumpTask_1
DTSRun OnError: DTSStep_DTSDataPumpTask_1, Error = -2147467259 (80004005)
Error string: The Microsoft Jet database engine cannot open the file '\\srvtx-01ap03\d$\Shared\Datos\Bases\Maestros.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
Error source: Microsoft JET Database Engine
Help file:
Help context: 5003051



Este es el SP:

CREATE PROCEDURE dbo.xxx_dtsImportacionArticulos

AS

DECLARE @result int



EXEC @result = master.dbo.xp_cmdshell 'dtsrun /S SRVTX-01AP03 /E /N DTS Importacion XXX_MaeArticulos Access a XXX_MaeArticulos SQL'

IF (@result = 0)
PRINT 'OK'
ELSE
PRINT 'Error en DTS'
GO


Espero puedan ayudarme
Saludos!!