SQL-DMO JobID - Returns a 32-character string

  • I may be missing something obvious here, but here goes.

    I am calling SQL-DMO via Ole Automation to return Job information (Name, Description, Enabled, JobID, etc). Everything seems to be working correctly except for the JobID. DMO returns a 32-character string that doesnt match the JobID. I wonder if it's just a conversion issue.

    I would appreciate any help or suggestions on this.

    JobID From SQL-DMO (32-character string) - '74BBC165754B0444A1A614EB8ACD1C1E'

    JobID in SQL Server (uniqueidentifier) - '9CF1A075-70E7-430F-B9BE-FA3936CB8A04'

  • If you remove the dashes from your "uniqueidentifer" examples, you will see that they are both 32-character hexadecimal strings.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Good point. The issue I'm having is the SQL-DMO.JobID does not match the msdb.jobid. I suspect the msdb.jobid is getting converted to a 32-character string.

  • I don't see anyway to convert from one to the other in your example ID's. They are definitely different numbers. This is either a handle that DMO created on its own or else a different ID from another part of the Job system.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply