Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Cannot delete filename. There has been a sharing violation. Expand / Collapse
Author
Message
Posted Tuesday, July 13, 2004 10:33 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, January 26, 2011 7:44 AM
Points: 339, Visits: 11
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?



Post #126103
Posted Tuesday, July 13, 2004 11:44 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 5:10 PM
Points: 2,987, Visits: 5,705
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.


Post #126121
Posted Wednesday, July 14, 2004 3:40 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, January 26, 2011 7:44 AM
Points: 339, Visits: 11
"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.



Post #126224
Posted Thursday, July 15, 2004 3:52 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, January 26, 2011 7:44 AM
Points: 339, Visits: 11
It happened again, this time I pressed CTRL SHIFT ESC to open the Task Manager and found and killed the hidden Excel process.


Post #126336
Posted Thursday, July 15, 2004 3:52 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, January 26, 2011 7:44 AM
Points: 339, Visits: 11
It happened again, this time I pressed CTRL SHIFT ESC to open the Task Manager and found and killed the hidden Excel process.


Post #126337
Posted Friday, March 23, 2012 8:39 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, March 23, 2012 8:38 AM
Points: 1, Visits: 2
Hi Guys, just to update you, finally I found a way to solve it
Do you have error messages?, like :

* Path too long
* Error cannot delete file: cannot read from source file or disk
* Cannot delete file: Access is denied
* There has been a sharing violation.
* Cannot delete file or folder The file name you specified is not valid or too long. Specify a different file name.

For that I tried it with: http://longpathtool.com/


Post #1271703
Posted Thursday, October 04, 2012 7:58 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 11, 2012 6:44 AM
Points: 4, Visits: 52
How about this Long Path Tool from pathtoodeep.com? Is it similar? I read a lot of great reviews about it..Any1 have any information. I visited their FAQ section and it's very helpful.
Post #1368798
Posted Thursday, August 22, 2013 10:12 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, August 22, 2013 10:12 AM
Points: 5, Visits: 0
try Long Path Tool
Post #1487388
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse