Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

SQL Server Agent Schedule Decoder Expand / Collapse
Author
Message
Posted Wednesday, December 23, 2009 9:24 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Saturday, June 01, 2013 6:01 PM
Points: 30, Visits: 250
Comments posted to this topic are about the item SQL Server Agent Schedule Decoder
Post #838844
Posted Wednesday, January 06, 2010 2:27 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, February 19, 2013 3:30 AM
Points: 37, Visits: 39
Thanks for the script - it lists scheduling info, but lists the job name as is. Would it be possible to also 'decrypt' the job name, somehow. we have a large number of reporting-services-generated jobs whose name are gibberish. It would be great if the job name could be translated to show the name of the RS schedule that the job represents. So far, I have been unable to decipher this type of job names.
Post #842609
Posted Wednesday, January 06, 2010 2:42 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, March 10, 2014 1:08 AM
Points: 130, Visits: 795
Great script but gives me an error.
Msg 102, Level 15, State 1, Line 12
Incorrect syntax near ' '.

I pasted the whole query into my Notepad++ and there I could see what the problem was:

SELECT SJ.name as job_name
, SJ.enabled as is_job_enabled
, SS.enabled as is_schedule_enabled
/*, ISNULL(SJ.description, '') as job_desc*/
, SS.name as schedule_name
, CASE freq_type
????WHEN 1 THEN 'Occurs on ' + STUFF(RIGHT(active_start_date, 4), 3,0, '/') + '/' + LEFT(active_start_date, 4) + ' at '
????????+ REPLACE( RIGHT(CONVERT(varchar(30),

So I got rid of the question marks, let SQL Refactor do the layout and it worked like a charm!
Probably a problem related to my setup but just in case somebody else has the same problem I attached the script.

Cheers


  Post Attachments 
SQLServerAgentScheduleDecoder.txt (26 views, 15.17 KB)
Post #842619
Posted Wednesday, January 06, 2010 6:24 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, October 26, 2012 9:46 AM
Points: 33, Visits: 116
Thanks. I got the same error. The corrected script works great.
Post #842720
Posted Wednesday, January 06, 2010 6:25 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 6:38 AM
Points: 39, Visits: 875
Thanks, great script. And yes, SQL 2005 or higher. I am one of those dinosaurs that still defaults to SQL2000 to keep customer backward compatibility.

As for the formatting, I also paste into Notepad++, then just do a Replace All on four question marks (????) with four spaces and that does the trick. Something to do with the HTML code control. The interesting thing is pasting into MS Word handles the question marks, but includes the HTML control in the document, so you still have to copy the code out of the control to make it more readable.




Post #842722
Posted Wednesday, January 06, 2010 6:41 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Saturday, June 01, 2013 6:01 PM
Points: 30, Visits: 250
liebesiech thank you for getting that fixed for me. For some reason when I submitted it to SQLServerCentral the control they use for the submission seems to have taken my tabstops and turned them into some nasty unicode character. I noticed it when I went to view source on the page. I don't know if there is any way for me to clean up the script on the main page. In any case thanks for taking the time to fix it!

-Michael Abair
Post #842739
Posted Wednesday, January 06, 2010 6:47 AM


Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, August 03, 2012 5:34 PM
Points: 8, Visits: 85
Very nice script. Thank you. Would have loved to have had this two weeks ago when I was documenting our schedules by hand.

I had the same problem copy and pasting the code into SSMS, but I just did a search and replace and then it worked.
Post #842743
Posted Wednesday, January 06, 2010 6:55 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, March 10, 2014 1:08 AM
Points: 130, Visits: 795
liebesiech thank you for getting that fixed for me.

Thanks to you for sharing this script!
Post #842750
Posted Wednesday, January 06, 2010 8:15 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, May 02, 2013 9:10 PM
Points: 26, Visits: 263
Very nice! It is great to have useful little scripts like this. We create procs from scripts like this and add them to our UTIL schema to make it easy to find and use them from SSMS.

Thanks for sharing.
Post #842843
Posted Wednesday, January 06, 2010 8:27 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: 2 days ago @ 11:25 AM
Points: 877, Visits: 928
c.masca (1/6/2010)
Thanks for the script - it lists scheduling info, but lists the job name as is. Would it be possible to also 'decrypt' the job name, somehow. we have a large number of reporting-services-generated jobs whose name are gibberish. It would be great if the job name could be translated to show the name of the RS schedule that the job represents. So far, I have been unable to decipher this type of job names.


You could join job_name to ScheduleID in the Schedule table in the ReportServer database to retrieve Name and EventType.



Post #842858
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse