2

One of development server "delete job history" job got deleted accidently. Now how to restore it back? We have ran the configuration wizard, but no luck.

  • is the job definition still there? – Gwny Apr 8 '15 at 6:15
  • no job definition is not there. – P S Apr 10 '15 at 5:23
3

If the timer job is gone, the only way (apart from re-installing the entire farm) to get the deleted timer job back is to run the SharePoint Products Configuration Wizard which will re-install the missing timer job.

Reference: Restoring the Out of the Box Timer Jobs

  • We ran the SharePoint Products Configuration Wizard and gave the restart to the server but no luck. – P S Apr 10 '15 at 5:24
  • @ps Strange. Looks like the only way to get it back is through a custom solution or a complete re-install and content move. – Benny Skogberg Apr 10 '15 at 5:50
  • Thanks Benny. I will not go for complete re-install as i am a SharePoint developer doing admin job as there is no admin. Can you give me idea how to do it with custom solution? I googled a bit and found that "Delete job history" uses a store procedure to delete history data from sharepoint config database. Is i have to run that store procedure from custom solution? – P S Apr 10 '15 at 6:25
  • Also is i am allow to run that store procedure from config database. As Microsoft says don't touch there database. – P S Apr 10 '15 at 6:26
  • @ps Microsoft says you can't alter database content, but to configure a procedure to run from SQL I guess wouldn't compromise warrenty. I guess thats the fastest solution for your problem, even if I'd do a complete package to replace the missing timer job. See Create and Deploy Custom Timer Job Definition in SharePoint Programatically – Benny Skogberg Apr 10 '15 at 6:32
1

I configured stored procedure to run from SQL. The stored procedure name is [proc_DeleteOldTimerJobHistory] which is available in SharePoint_config database.

New Update:

I got another solution to resolve issue.

Running below Powershell scripts restore the deleted default timer Job.

$farm = Get-SPFarm  
$farm.TimerService.EnsureDefaultJobs()  

Reference: How to Restore sharepoint out of box deleted timer jobs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.