December 2, 2010 at 3:00 pm
While creating a job run (to do a log backup), I unfortunately did not use sp_delete_job, but instead tried to delete the row out of msdb..sysjobs. While trying to clean up this mess, I also deleted rows with a matching job_id out of the following tables:
- msdb.dbo.sysjobservers
- msdb.dbo.sysjobs_view
- msdb.dbo.systaskids
- msdb.dbo.sysdbmaintplan_jobs
- msdb.dbo.sysalerts
- msdb.dbo.sysmaintplan_subplans
- msdb.dbo.sysdownloadlist
- msdb..sysjobschedules
- msdb..sysschedules
- msdb..sysjobsteps
and ran msdb.dbo.sp_delete_job_references @notify_sqlagent = 0
and ran msdb.dbo.sp_delete_job @job_name 'Backup_MyDB_Log'
by determining if there were any orphaned records. These are all the tables that I saw referenced in sp_delete_job. But without fail, every scheduled time period, I get an e-mail (because I'm on the "notify if fails" list) that says that it failed with the following message:
The job failed. Unable to retrieve steps for job Backup_MyDB_Log
The owner of the job is SA
That makes sense, since I had alread deleted the sysjobsteps. But my quesiton is this: what still has a reference to this job and how do I get rid of it?
Thanks in advance.
December 2, 2010 at 3:15 pm
Was logshipping set up on this DB?
December 2, 2010 at 3:29 pm
No, log shipping was not turned on.
December 3, 2010 at 12:16 pm
Any ideas on this one? Or a direction to take in solving it? Could it be something unrelated to the sys tables?
Any suggestions are welcome.
Thanks
Andre
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply