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

Distribution clean up Failing Expand / Collapse
Author
Message
Posted Thursday, May 15, 2008 8:30 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, October 28, 2008 4:41 AM
Points: 54, Visits: 42
Hi

I have a Distribution clean up job failing on a SQL 2K5 Enterprise Instance (Windows Server 2003) Failing with the following error:-

Executed as user: *******. Could not remove directory 'DIRECTORY....'. Check the security context of xp_cmdshell and close other processes that may be accessing the directory. [SQLSTATE 42000] (Error 20015). The step failed.

I have checked all the obvious xp_cmdshell permissions, account permissions etc.
I can delete the folders when I log on to the server as admin.

When i look in to event viewer i find this error:-

Replication-@rowcount_only parameter must be the value 0,1, or 2. 0=7.0 compatible checksum. 1=only check rowcou: agent distribution@rowcount_only parameter must be the value 0,1, or 2. 0=7.0 compatible checksum. 1=only scheduled for retry. Could not clean up the distribution transaction tables.

Cheers,
Paul
Post #501360
Posted Thursday, May 15, 2008 10:18 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Thursday, December 4, 2014 7:52 AM
Points: 9,294, Visits: 9,495
You cannot remove a Directory in use, no matter what your privileges are. I wold suggest trying to find the directory that it is trying to remove and see what else is using it.

-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #501490
Posted Monday, January 13, 2014 1:31 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, October 20, 2014 11:51 AM
Points: 49, Visits: 450
I have the same issue.

my 'unc' folder automatically set security without fullcontrol for SQLSERVERAGENT when I setup the publictions. I had manully granted full control to SQLSERVERAGENT. (xp_cmdshell enabled. [NT SERVICE\SQLSERVERAGENT] in sysadmin role)

I didn't find other process is in use on those folders(expired snapshots). I can manully delete the unc's subforders.

appreciate any helps...


Post #1530443
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse