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. |