question

jhunu avatar image
jhunu asked

list of sql jobs on the server

I need a query to find the list of sql jobs on the server . What is the query
sql-servertsqlsql-agent
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
salum avatar image
salum answered
below query gives information about jobs , their steps and the commands. SELECT [sysjobs].[name] AS N'job_name', [sysjobsteps].[step_name], [sysjobsteps].[command] AS N'step_command', [sysjobsteps].[database_name], [sysjobsteps].[output_file_name], [sysjobsteps].[last_run_date], [sysjobsteps].[last_run_time] FROM [msdb].[dbo].[sysjobsteps] INNER JOIN [msdb].[dbo].[sysjobs] ON [msdb].[dbo].[sysjobsteps].[job_id] = [msdb].[dbo].[sysjobs].[job_id];
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.