Property ErrorLogFile is not available for JobServer 'ServerNameHere'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)

I got the below error in SQL Server 2008 R2. When we try to see the properties of SQL Server agent(right click on the SQL Server Agent and click properties). I could see the below error message.

Property Error Log File is not available for JobServer 'ServerNameHere'. This property may not exist for this object, or may not be retrievable due to insufficient access rights.  (Microsoft.SqlServer.Smo)

Cause: SQL Server unable to find or deleted the Errorlog of SQL Server Agent. So we need manually set this up to rectify this error.

If you run the below procedure first(sp_get_sqlagent_properties) it will show as NULL. Because that path has not been defined yet.

So we need to set it up with the second stored procedure below as (sp_set_sqlagent_properties)

USE MASTER
GO
EXEC msdb..sp_get_sqlagent_properties
GO
USE MASTER
GO
EXEC msdb.dbo.sp_set_sqlagent_properties 
@errorlog_file=N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\LOG\SQLAGENT.OUT'

Comments

Popular posts from this blog

System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

Pre login Handshake or Connection Timeout Period

Transparent Data Encryption(TDE) with Master Key and Certificate in SQL Server