If you are trying to start SQL Server Agent and you get the error message SQLServerAgent could not be started (reason: Unable to connect to server ‘(local)’; SQLServerAgent cannot start) then read below, in order to see what you can try for resolving the issue.
How to Resolve the Issue
Go to computer management – local users and groups, and add the service account with which you want SQL Server Agent service to start in the below Windows group:
SQLServerSQLAgentUser$[ComputerName]$[InstanceName]
Then, make sure that the service account meets the requirements described on the following MSDN Article.
One of the requirements is that the SQL Server Agent service account is SysAdmin on the SQL Server instance.
So, among the rest of the requirements, make sure that the local Windows Group “SQLServerSQLAgentUser$[ComputerName]$[InstanceName]” has SysAdmin access on the SQL Server instance (important note: never add any irrelevant users to this group – just the service account that start SQL Server agent service).
The last step is to go to SQL Server Configuration Manager, enter SQL Server Agent properties and make sure that the service account that starts the service is the one for which you followed the above steps.
Note: In order to avoid such issues in the future, make sure that during the installation of SQL Server you specify the proper service accounts. This way, SQL Server’s installation process will automatically grant the necessary permissions and arrange the required group memberships for the specified service accounts.
Learn more tips like this! Enroll to our Online Course!
Check our online course titled “Essential SQL Server Administration Tips” (special limited-time discount included in link).
Learn essential hands-on SQL Server Administration tips on SQL Server maintenance, security, performance, integration, error handling and more. Many live demonstrations and downloadable resources included!
If the Above did not Resolve the Issue
If the above did not resolve the issue, there are some additional steps that might help with your troubleshooting process. To this end, you can try reading the SQL Server error log, in order to find additional information about the error. You can easily find the location of SQL Server’s log file by running the below T-SQL query from SQL Server Management Studio:
USE master GO xp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc' GO
Alternatively, you can check the Application Log in Windows Event Viewer on the database server.
Featured Online Courses:
- AI Essentials: A Beginner’s Guide to Artificial Intelligence
- SQL Server 2022: What’s New – New and Enhanced Features
- Working with Python on Windows and SQL Server Databases
- Introduction to Azure Database for MySQL
- Boost SQL Server Database Performance with In-Memory OLTP
- Introduction to Azure SQL Database for Beginners
- Essential SQL Server Administration Tips
- SQL Server Fundamentals – SQL Database for Beginners
- Essential SQL Server Development Tips for SQL Developers
- Introduction to Computer Programming for Beginners
- .NET Programming for Beginners – Windows Forms with C#
- SQL Server 2019: What’s New – New and Enhanced Features
- Entity Framework: Getting Started – Complete Beginners Guide
- Data Management for Beginners – Main Principles
- A Guide on How to Start and Monetize a Successful Blog
Related Error Messages and ways to Resolve them:
- Operating System Error 170 (Requested Resource is in use)
- There is no SQL Server Failover Cluster Available to Join
- Setup failed to start on the remote machine. Check the Task scheduler event log on the remote machine.
- SQL Server 2008 R2 Service Pack Installation Fails – Element not found. (Exception from HRESULT: 0x80070490)
- Could not load file or assembly ‘Microsoft.SqlServer.Smo, Version=10.0.0.0, …
- The operation failed because either the specified cluster node is not the owner of the group, or the node is not a possible owner of the group
- Issue Adding Node to a SQL Server Failover Cluster – Greyed Out Service Account – How to Resolve
- … more SQL Server troubleshooting articles
Subscribe to our newsletter and stay up to date!
Subscribe to our YouTube channel (SQLNetHub TV)
Check out our latest software releases!
Check our eBooks!
Rate this article:
Reference: SQLNetHub.com (https://www.sqlnethub.com)
© SQLNetHub
Artemakis Artemiou, a distinguished Senior Database and Software Architect, brings over 20 years of expertise to the IT industry. A Certified Database, Cloud, and AI professional, he earned the Microsoft Data Platform MVP title for nine consecutive years (2009-2018). As the founder of SQLNetHub and GnoelixiAI Hub, Artemakis is dedicated to sharing his knowledge and democratizing education on various fields such as: Databases, Cloud, AI, and Software Development. His commitment to simplicity and knowledge sharing defines his impactful presence in the tech community.