Distribution cleanup failing

  • Getting this error constantly when running the Distribution Clean Up. I think the SQL Agent is running as NT AUTHORITY\SYSTEM. That is the username under the Windows group for MSSQLAGENT...

    Distribution DB is hitting 155 Gb now or at least that's what the backup of it is.

    =======================================================

    01/21/2011 10:05:00,Distribution clean up: distribution,Error,1,SERVER,Distribution clean up:

    distribution,Run agent.,,Executed as user: NT AUTHORITY\SYSTEM.

    Could not remove directory '\\SERVER\Replication_Log\unc\SERVER_WFCDB_WKUTDB_REPLICATION\20091223093604\'.

    =========================================================

    Fails when I try to run manually as well as my domain account.

    EXEC dbo.sp_MSdistribution_cleanup @min_distretention = 24, @max_distretention = 72

    xp_cmdshell is enabled.

    Do not know how to check to see if NT AUTHORITY\SYSTEM has access privs to that folder. I do not see it in the security window for that folder but I also cannot find the user to select and add it as well for a privs issue.

  • I got the command below to finally run in query. I got it to run going to Administrative Tools - Computer Management - Shared Folders - Shares, and setting the Share Permissions to the same as Security (at least for Administrators). I guess I'm currently running this manually as my Domain username which has Admin rights. This still may not fix my "running it as a JOB" issue.

    EXEC dbo.sp_MSdistribution_cleanup @min_distretention = 336, @max_distretention = 360

    Its been running for two hours as of now. Wonder how long it will take? The backup of it was around 155 Gb.

  • The share fix above fixed both issues with the Job failing and not being able to run it manually.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply