July 13, 2004 at 10:33 am
I get the following message after a file has been locked by a long running job (which fired a DTS package) which I had to stop.
"Cannot delete filename. There has been a sharing violation.
The source or destination file may be in use."
Other than reboot the server, is there any other way of deleting this file?
July 13, 2004 at 11:44 am
just a guess. Do you know of any process which might be using this file. Then try to terminate that process and delete the file.
July 14, 2004 at 3:40 am
"Do you know of any process which might be using this file"
Yes I have worked out exactly which process caused the problem.
There is a job running which runs a DTS Package. Within this package I use the file object to copy an excel template and then use CreateObject("Excel.Application") to open the copied Excel workbook and manipulate it.
During this process, I reckon Excel asked for user response which as it is invisible caused the job to go into an indefinite wait. I stopped the job.
I have identified the reason why Excel asked for user response and will eliminate the cause, however this could happen again and having to reboot the server is not a very satisfactory solution.
By the way I connect to the Server using Terminal Services.
July 15, 2004 at 3:52 am
It happened again, this time I pressed CTRL SHIFT ESC to open the Task Manager and found and killed the hidden Excel process.
July 15, 2004 at 3:52 am
It happened again, this time I pressed CTRL SHIFT ESC to open the Task Manager and found and killed the hidden Excel process.
March 23, 2012 at 8:39 am
This was removed by the editor as SPAM
October 4, 2012 at 7:58 pm
This was removed by the editor as SPAM
August 22, 2013 at 10:12 am
This was removed by the editor as SPAM
April 11, 2020 at 6:11 pm
This was removed by the editor as SPAM
April 11, 2020 at 6:19 pm
Post deleted. It's no longer needed.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 18, 2020 at 5:05 pm
This was removed by the editor as SPAM
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply