![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||||
| |||||
|
|
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 |
|
) 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 |
|
) 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 ************************************************** ************************** |
| |
#3
| ||||
| ||||
|
|
This property is checked in DTS packag |
|
file path is passed through the stored procedure and file is also located on database serve |
|
first I set some global variable in Dynamic Properties Task, < upon success > I open the text file based on global variable assigned in previous step, then transform data task step which uses a few activex script and normal mapping from text file to destination database. even when I disable database logging and error logging to text file this problem happen |
|
will this help? As I said when i rerun the same thing which failed first time it goes fine |
#4
| |||
| |||
|
|
It looks as though a process is using the text file that you want to use in the DataPump task. Maybe the connection os still open? Try setting "Close Connection on Completion" in the workflow properties. This property is checked in DTS package Remember that DTS is a client and filepaths need to be as per the client view. file path is passed through the stored procedure and file is also located on database server Are multiple tasks executing at the same time therefore logging to the same file? first I set some global variable in Dynamic Properties Task, < upon success > I open the text file based on global variable assigned in previous |
|
Have you tried saving the package out to another name and then using that.? will this help? As I said when i rerun the same thing which failed first time it goes fine. Though One question I have for you- there is a property "Limit the maximum number of tasks executed in parallel to" ours is web application and at one point of time there could be any number of user accessing the application. Currently it is set to 4( default). what will happen if more there is more then 4 simultanious request? What should be ideal value for real time web application which in turn accesses the DTS package by invoking a stored procedure. Could this default value of 4 be cause of this error Thanks for all help raj |
![]() |
| Thread Tools | |
| Display Modes | |
| |