duplicate job schedules

  • Hello,

    I have a procedure which creates a job then step, then schedules. If i execute this procedure three times i get three schedules. schedules are of same name and with same start time. How can i check if any schedule with this name already exists. ? please help.

    I need to check schedule name within a job along with start time.

    Thanks

  • The schedules are stored in msdb. You can query the tables there to see if a row already exists with the criteria you want to use.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Which table exectle, because i can not see any column in sys tables storing schedule names.

  • Mistypo....using cell phone. excuse me

    i meant which table stores schedule NAME and start time info. I can see one.

  • msdb.dbo.sysschedules

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Got it.

    Thanks

Viewing 6 posts - 1 through 5 (of 5 total)

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