Clear distribution in SQL Server2000 replication: Distribution failed [reprinted]

Source: Internet
Author: User

Http://hi.baidu.com/luck001221/blog/item/66eb3e8c60605215b21bba6d.html

I encountered a problem a while ago. I deleted some unused copy and distribution items while sorting out and deleting copies and distribution. Later, when running the replication monitor, I found that Program In the --> clear Distribution: distribution failed. The failed content displayed in the job is:

Execution User: interpub \ administrator. The directory '\ interpub \ F $ \ repldata \ UNC \ interpub_pactnet_rep_pactnet_pactnet \ 20081017165023 \' cannot be deleted \'. Check the security context of xp_cmdshell and disable other processes that may be accessing the directory. [Sqlstate 42000] (error 20015) copy-@ rowcount_only parameter value must be 0, 1, or 2. 0 indicates the 7.0 compatible check value. 1 indicates that only the number of lines is verified. 2 indicates the new verification Value Function in version 8.0. : The value of the scheduled agent distribution @ rowcount_only parameter must be 0, 1, or 2. 0 indicates the 7.0 compatible check value. 1 indicates that only the number of lines is verified. 2 indicates the new verification Value Function in version 8.0. To retry. The distributed transaction table cannot be cleared. [Sqlstate 01000] (Message 14152). Step failed.

At that time, there was no time to worry about this. Because there is no performance or other impact. Today, we have time to focus on solving this problem. At first, it was suspected that the data in some system tables was not deleted when replication and distribution were being deleted, and spam data exists, resulting in job failure.

When a real check fails, four files are found in the 20081017165023 directory under the distribution directory, so it seems that someone is using the file name. So I copied a file. It turns out that the copied file cannot be opened, prompting someone to use it.

Evil

Find the Microsoft official tool Filemon, which can check which process ID occupies which files. No one is using it ?? Why can't I change my name.

After looking for the system administrator, he can see at a glance that he checked the permission settings for this folder in the folder properties. I also saw that there is only one everyone permission and there is no other account. To clear the distribution job, you must delete the files in this directory. The Agent Startup account does not have permission to operate on this directory. An error is returned. All permissions on the disk are read and run only by everyone. I didn't know which hacker it was, and changed the disk permission. As a result, the following folder security attributes inherit the settings of the root directory. Really disgusting.

Add the account for starting the agent service to the security group and grant full control permissions to the account.

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.