October 5, 2012 at 1:37 am
hi,
i need a script which will give present existing Job names in the sql server instance.
thanks
Arjun
October 5, 2012 at 2:01 am
query the sysjobs table in the MSDB database for the info you need
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" ๐
October 5, 2012 at 3:04 am
can you give the query for this
October 5, 2012 at 3:23 am
SELECT job.job_id,notify_level_email
,name,enabled,description
,step_name,command,server,database_name
FROM msdb.dbo.sysjobs job JOIN
msdb.dbo.sysjobsteps steps
ON job.job_id = steps.job_id
WHERE job.enabled = 1
October 5, 2012 at 3:24 am
also gets the category name and filters out the report server jobs.
SELECT sysjobs.name 'Job Name',
syscategories.name 'Category',
CASE [description]
WHEN 'No Description available.' THEN ''
ELSE [description]
END AS 'Description'
FROM msdb.dbo.sysjobs
INNER JOIN msdb.dbo.syscategories ON msdb.dbo.sysjobs.category_id = msdb.dbo.syscategories.category_id
WHERE syscategories.name <> 'Report Server'
ORDER BY sysjobs.name
October 5, 2012 at 3:30 am
SQLDBA ARJUN (10/5/2012)
hi,i need a script which will give present existing Job names in the sql server instance.
thanks
Arjun
This article[/url] will help you write your own script.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply