Posts

Showing posts from March, 2022

Handling split backups with Ola Hallengren script

The below mentioned query will used for split backups which is extracted from  Ola Hallengren  scripts. @NumberOfFiles parameter will create mentioned files. EXECUTE [dbo].[DatabaseBackup] @ Databases = 'ALL_DATABASES' , @ Directory = 'N:\SQLBackups\' , @ BackupType = 'FULL' , @ Verify = 'Y' , @ CleanupTime = 168 , @ CheckSum = 'Y' , @ LogToTable = 'Y' , @ compress = 'Y' , @ NumberOfFiles = 3

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'