Tag: agent

How to find/modify SQLServer Agent logfile location?

To get the location of SQLServer Agent log file, the log file is called SQLAGENT.out DECLARE @oem_errorlog nvarchar(255) EXECUTE master.dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\SQLServerAgent', N'ErrorLogFile', @oem_errorlog OUTPUT, N'no_output' PRINT @oem_errorlog Sample Output: C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLAGENT.OUT To modify location and name of SQLServer Agent logfile USE [msdb] GO EXEC msdb.dbo.sp_set_sqlagent_properties @errorlog_file=N'C:\temp\SQLAGENT.OUT' GO To recycle SQLServer Agent … Continue reading How to find/modify SQLServer Agent logfile location?

“Step Error Description:Class not registered” error message when executing a job through SQLServer Agent?

After scheduling a task through SQLServer Agent it generated the error below when executing the DTS. The DTS package required Oracle OLE-DB drivers which was installed. The error message is a generic error message. Step Error Source: Microsoft Data Transformation Services (DTS) Package Step Error Description:Class not registered (Microsoft Data Transformation Services (DTS) Package (80040154): … Continue reading “Step Error Description:Class not registered” error message when executing a job through SQLServer Agent?

How to identify the job running through SQLServer Agent using SQL?

-- List processes currently running through SQLServer Agent select spid, program_name, blocked from master..sysprocesses where program_name like 'SQLAgent%' spid program_name blocked ------ --------------------------------------------------------------------------------- ------- 148 SQLAgent - TSQL JobStep (Job 0x6CDB1221B7584941B63E44C95E805E43 : Step 1) 0 -- Using the Job from program_name in Step 1, find information on the job select job_id, name, description from msdb..sysjobs … Continue reading How to identify the job running through SQLServer Agent using SQL?