sql server dts:
I have a dot net application in c# which invokes a stored procedure.
The stored procedure invokes a DTS package . DTS package take a text file and transfer data to sql server table
This part fails roughly 3 times in 100 attempt.
I am not able to find out why exactly it is happening.
When I web application runs the code again with same parameter it always suceeds.
I will appreciate any insinght.
The part of code for stored proc and dts error log message is given below
DTS error message in short is-
Step Error Description:The process cannot access the file because it is being used by another process.
(Microsoft Data Transformation Services (DTS) Package (80070020): Cannot open a log file of specified name. The process cannot access the file because it is being used by another process.
)
Stored proc code-
-- Execute Pkg
EXEC @hr = sp_OAMethod @oPKG, 'Execute'
IF @hr <> 0
BEGIN
--PRINT '*** Execute failed'
EXEC sp_OAGetErrorInfo @oPKG, @src OUT, @desc OUT
SELECT hr=convert(varbinary(4),@hr), Source=@src, Description=@desc
SET @ErrorInsertStmt=@ErrorInsertStmt +''''+Replace(@src,'''',' ')+''','''+Replace(@desc,'''',' ')+''','
SET @ErrorInsertStmt=@ErrorInsertStmt +'''Package execution failed in sp_OAMethod '')'
EXEC sp_executesql @ErrorInsertStmt
select @dtsReturnValue=4
RETURN
END
the above code fails and the dts error log says
****************************************************************************************************
The execution of the following DTS Package failed:
Error Source: Microsoft Data Transformation Services (DTS) Package
Error Description:Package failed because Step 'DTSStep_DTSDataPumpTask_1' failed.
Error code: 80040428
\Error Help File:sqldts80.hlp
Error Help Context ID:700
Package Name: pkg_cr_tally
Package Description: (null)
Package ID: {09192115-BD41-4080-ABDC-ECF003736C0B}
Package Version: {DB783FFC-A11B-420E-A950-5F9AD4231193}
Package Execution Lineage: {9EB6AA93-B1F0-45B0-82AD-333B21F6A0AA}
Executed On: GANDALF
Executed By: sqlservice
Execution Started: 1/14/2004 1:31:05 PM
Execution Completed: 1/14/2004 1:31:06 PM
Total Execution Time: 0.297 seconds
Package Steps execution information:
Step 'DTSStep_DTSDataPumpTask_1' failed
Step Error Source: Microsoft Data Transformation Services (DTS) Package
Step Error Description:The process cannot access the file because it is being used by another process.
(Microsoft Data Transformation Services (DTS) Package (80070020): Cannot open a log file of specified name. The process cannot access the file because it is being used by another process.
)
Step Error code: 80070020
Step Error Help File:sqldts80.hlp
Step Error Help Context ID:1100
Step Execution Started: 1/14/2004 1:31:05 PM
Step Execution Completed: 1/14/2004 1:31:06 PM
Total Step Execution Time: 0.266 seconds
Progress count in Step: 0
Step 'DTSStep_DTSDynamicPropertiesTask_1' succeeded
Step Execution Started: 1/14/2004 1:31:05 PM
Step Execution Completed: 1/14/2004 1:31:05 PM
Total Step Execution Time: 0 seconds
Progress count in Step: 0
****************************************************************************************************