המותגים שלנו

ברוכים הבאים לאתר האינטרנט של שניידר אלקטריק

ברוכים הבאים לאתר שלנו.
		
איך נוכל לעזור לך היום?
How to Obtain All SQL Server Jobs Details

Issue
How to obtain all the details of all SQL Jobs created on a SQL server instance.

Product Line

ION Enterprise 6.0. x

Struxureware Power Monitoring 7.0.x
Power Monitoring Expert 7.2.2
Power Monitoring Expert 8.2
Power Monitoring Expert 9.0



Environment
SQL Server 2005, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017

Cause
For daily monitoring purposes or for troubleshooting SQL job issues, obtaining information about the SQL jobs via a single query can be very useful and time saving alternative method.

Resolution
*Warning: Irreparable database damage can occur. This procedure should only be performed by users familiar with SQL Server Management Studio. Databases should be backed up prior to performing this procedure.*

This query will provide the sql server job details for all jobs present.  It will provide job name, job status, Last run date of job & job execution status (failed or successful)
It may also be modified to add or change the fields reported as per requirement.

To obtain these job details, log into SQL Server Management Studio and run the attached SQL script (SQL_Job_Details.sql).
Alternatively, execute the query(s) below:

Use msdb 
go 
select distinct j.Name as "Job Name", --j.job_id, 
case j.enabled  
when 1 then 'Enable'  
when 0 then 'Disable'  
end as "Job Status", jh.run_date as [Last_Run_Date(YY-MM-DD)] ,  
case jh.run_status  
when 0 then 'Failed'  
when 1 then 'Successful'  
when 2 then 'Retry' 
when 3 then 'Cancelled'  
when 4 then 'In Progress'  
end as Job_Execution_Status 
from sysJobHistory jh, sysJobs j 
where j.job_id = jh.job_id and jh.run_date =   
(select max(hi.run_date) from sysJobHistory hi where jh.job_id = hi.job_id ) -- to get latest date 

שניידר אלקטריק ישראל

קבצים מצורפים
SQL_Job_Details.sql [566 Bytes]
How to Obtain All SQL Server Jobs Details

Issue
How to obtain all the details of all SQL Jobs created on a SQL server instance. 

Product Line

ION Enterprise 6.0. x

Struxureware Power Monitoring 7.0.x
Power Monitoring Expert 7.2.2
Power Monitoring Expert 8.2
Power Monitoring Expert 9.0



Environment
SQL Server 2005, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014, SQL Server 2016, SQL Server 2017

Cause
For daily monitoring purposes or for troubleshooting SQL job issues, obtaining information about the SQL jobs via a single query can be very useful and time saving alternative method.

Resolution
*Warning: Irreparable database damage can occur. This procedure should only be performed by users familiar with SQL Server Management Studio. Databases should be backed up prior to performing this procedure.*

This query will provide the sql server job details for all jobs present.  It will provide job name, job status, Last run date of job & job execution status (failed or successful)
It may also be modified to add or change the fields reported as per requirement.

To obtain these job details, log into SQL Server Management Studio and run the attached SQL script (SQL_Job_Details.sql). 
Alternatively, execute the query(s) below:
 

Use msdb 
go 
select distinct j.Name as "Job Name", --j.job_id, 
case j.enabled  
when 1 then 'Enable'  
when 0 then 'Disable'  
end as "Job Status", jh.run_date as [Last_Run_Date(YY-MM-DD)] ,  
case jh.run_status  
when 0 then 'Failed'  
when 1 then 'Successful'  
when 2 then 'Retry' 
when 3 then 'Cancelled'  
when 4 then 'In Progress'  
end as Job_Execution_Status 
from sysJobHistory jh, sysJobs j 
where j.job_id = jh.job_id and jh.run_date =   
(select max(hi.run_date) from sysJobHistory hi where jh.job_id = hi.job_id ) -- to get latest date 

שניידר אלקטריק ישראל

קבצים מצורפים
SQL_Job_Details.sql [566 Bytes]
גלה עוד
טווח:
גלה עוד
טווח:
גלה עוד
טווח:
גלה עוד
טווח:

זקוק לעזרה?

  • התחל כאן!

    מצא תשובות כעת. חפש פתרון בעצמך או פנה אל אחד המומחים שלנו.

  • פניה למחלקת התמיכה

    פנה לצוות שירות הלקוחות שלנו לקבלת מידע נוסף, תמיכה טכנית, סיוע בתלונות ועוד.

  • היכן לקנות?

    אתר בקלות את מפיץ Schneider Electric הקרוב ביותר אליך.

  • גלוש ב'שאלות נפוצות'

    עיין בשאלות הנפוצות לפי נושאים וקבל את התשובות שאתה מחפש.

  • תיעוד מוצרים
  • בורר המוצר
  • מוצרים חלופיים והחלפה
  • מרכז עזרה ויצירת קשר
  • איתור סניפי שניידר אלקטריק
  • היכן לקנות
  • משרות
  • פרופיל חברה
  • דיווח על התנהגות בלתי הולמת
  • נגישות
  • חדר חדשות
  • משקיעים
  • EcoStruxure
  • חיפוש משימה
  • בלוג
  • מדיניות שמירה על פרטיות
  • הודעה על קובצי Cookie
  • תנאי שימוש
  • Change your cookie settings
Your browser is out of date and has known security issues.

It also may not display all features of this website or other websites.

Please upgrade your browser to access all of the features of this website.

Latest version for Google Chrome, Mozilla Firefox or Microsoft Edgeis recommended for optimal functionality.