Question

What is preventing Agent Service from starting after:

  1. Failing to install CU.
  2. Running a successful repair after disabling HIPS.

Background: Installing CU's for Microsoft SQL Server I found I have an issue with the security software on my system.

After disabling the offending security software preventing my installation of patches and the repair process afterwards, I now have an issue with restarting the agent service.

Error during repair states:

Microsoft SQL Server #### Setup
The Following error has occured:
The process cannot access the file 'C:\windows\system32\perf-MSSQL13.MSSQLSERVER-sqlagtctr.dll'
because it is being used by another process.
Click 'Retry' to retry the failed action, or click 'Cancel' to cancel this action and continue setup.

I am thinking I do not need to repair the service just yet, but something will need to be fixed.

New thoughts?

Was it helpful?

Solution

Continuing to troubleshoot I did a search for sql repair perf-mssql13.mssqlserver-sqlagtctr.dll being used by another process and found the following article: Knowledgebase article: File in use by another process

The repair continued after I applied the same advice to the file in question.

When repair completed I was not able to start the agent service. I did a search for the following from the "Event Viewer": failed to initialize sql agent log (reason access is denied) and found the following article: MSSQLTIPS: SQL Server Agent Service Won't Start Due to Access Denied

What I found out: when SQL is installed, it places a security lockdown on the log directory. It changes owners and restricts access to only the agent service account. The DBA that installed the system used default settings to install SQL Server, and then changed the service accounts to domain accounts. In this case, I found it curious the Engine Service account had access to the directory, but not the Agent Log files.

Solution: Check the permissions on the Log Directory and look for errors regarding the files.

  1. Rename the file from the error during repair.
  2. Added the Agent Service Account permission to the log in question and log directory.
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top