SQL Server Agent performs [distribution cleanup: distribution] Unable to delete snapshot file

Source: Internet
Author: User

Occasionally checks database jobs for failures every day and finds errors

[SQL]View Plaincopy
    1. Select Top Ten job_id,run_date,run_time,run_duration,step_name,message
    2. From msdb: sysjobhistory where run_status = 0
    3. ORDER by run_date desc,run_time desc



The job failed. Plan 12 (replication agent schedule. ) called the job. The last Run is Step 1 (run the agent. )。.

was executed as user Ntauthority\networkservice.

Unable to delete directory ' d:\database\repldata\unc\*****************************\20150206021846\ '.

Review the security context of the xp_cmdshell and close other processes that may be accessing the directory.

[SQLSTATE 42000] (Error 20015). The step failed.

Error log message:

[email protected]_only parameter value must be 0, 1 or 2. 0=7.0 compatible checksum. 1= checks only the row count. 2= The new checksum feature introduced in version 8.0. : Agent [Email protected]_only parameter value must be 0, 1, or 2. 0=7.0 compatible checksum. 1= checks only the row count. 2= The new checksum feature introduced in version 8.0. Scheduled for retry. The Distribution transaction table could not be cleared.

[SQL]View Plaincopy
    1. --View the jobs performed
    2. SELECT * from msdb.dbo.sysjobs where job_id = ' dc0df572-9339-46ed-84e7-2c1ed622c067 '


View SQL Server Agent account, NT authority\network SERVICE

Find this directory, is the snapshot directory, has not been used for a long time. A few days ago there was initialization used, today the snapshot expires, and the distribution cleanup runs deleted.

The Agent account NT Authority\Network SERVICE does not have permission to manipulate folders

Add User Object NT Authority\Network SERVICE

Grant all permissions

OK, now execute [distribution cleanup: distribution] job, success!

SQL Server Agent performs [distribution cleanup: distribution] Unable to delete snapshot file

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.