How to recover a job that i deleted from job activity monitor

  • Hi, all

    I accidentally deleted the job that are created on primary and secondary data base when I was configured for log shipping.

    the backup job on primary

    the copy job and restore job on secondary

    is there a way to recover these jobs this is on sql 2012

  • Restore a backup of MSDB as a user database, extract the job (it'll be in the sysjobs and sysjobsteps tables), recreate it.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I don't have back up of msdb?

  • harita (10/8/2013)


    I don't have back up of msdb?

    you don't have a backup of MSDB? Why not? Do you understand what all it holds? Don't mean to scold however...

    MCSE SQL Server 2012\2014\2016

  • it is dev environment and there is no maintenance job on this box

  • Then you'll have to recreate the job from scratch. Once done, may I suggest setting up backups? The fact that it's a dev server does not mean it's unimportant.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I tried to recreate the jobs from scratch but still getting errors

  • and yes I am going to talk to my admin about a back up plan

  • harita (10/8/2013)


    it is dev environment and there is no maintenance job on this box

    really??? might want to talk about getting something...Glad you got the job back from scratch

    MCSE SQL Server 2012\2014\2016

  • harita (10/8/2013)


    I tried to recreate the jobs from scratch but still getting errors

    This happened to me, I had to remove log shipping completely and remove all the agent jobs. This is not an easy process. Google scripts to remove log shipping.

    MCSE SQL Server 2012\2014\2016

Viewing 10 posts - 1 through 9 (of 9 total)

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