Sunday, February 19, 2012

Error 222022 When Starting a Job

When trying to run any job, I am now getting "Errror 22202: SQL Server Job
Error: Job oXxxxxxxxxx does not exist in the job cache."
Any ideas?
Correction: that error number should be 22022
|||What's in the SQL Server Agent log? Have you tried
restarting SQL Server Agent service?
-Sue
On Mon, 4 Oct 2004 08:41:01 -0700, "Ed"
<Ed@.discussions.microsoft.com> wrote:

>When trying to run any job, I am now getting "Errror 22202: SQL Server Job
>Error: Job oXxxxxxxxxx does not exist in the job cache."
>Any ideas?
|||Yes, I've tried restarting everything, even going so far as to reboot. Here
are the messages from SQLAGENT.OUT.
2004-10-05 08:20:35 - ! [291] An unresolved problem exists with the download
instructions (sysdownloadlist) for target server 'D6YLQF51' at MSX 'D6YLQF51'
2004-10-05 08:20:58 - ! [156] Job 0xB54D1C8D1F41994D9CE870C7083ABAC1 does
not exist in the job cache: attempting to re-acquire it from the server...
2004-10-05 08:20:58 - ! [000] Job 0xB54D1C8D1F41994D9CE870C7083ABAC1 does
not exist in the job cache
"Sue Hoegemeier" wrote:

> What's in the SQL Server Agent log? Have you tried
> restarting SQL Server Agent service?
> -Sue
> On Mon, 4 Oct 2004 08:41:01 -0700, "Ed"
> <Ed@.discussions.microsoft.com> wrote:
>
>
|||So was this server set up for MSX (multiserver administration)? Is it
still suppose to be set up for this? Or did you rename the server?
-Sue
On Tue, 5 Oct 2004 05:29:07 -0700, "Ed" <Ed@.discussions.microsoft.com>
wrote:
[vbcol=seagreen]
>Yes, I've tried restarting everything, even going so far as to reboot. Here
>are the messages from SQLAGENT.OUT.
>2004-10-05 08:20:35 - ! [291] An unresolved problem exists with the download
>instructions (sysdownloadlist) for target server 'D6YLQF51' at MSX 'D6YLQF51'
>2004-10-05 08:20:58 - ! [156] Job 0xB54D1C8D1F41994D9CE870C7083ABAC1 does
>not exist in the job cache: attempting to re-acquire it from the server...
>2004-10-05 08:20:58 - ! [000] Job 0xB54D1C8D1F41994D9CE870C7083ABAC1 does
>not exist in the job cache
>
>"Sue Hoegemeier" wrote:
|||I might have done something at one point (not sure what), but the server is
NOT now supposed to be set up for MSX. In Enterprise Manger, the Sql Server
Agent label does NOT have "(MSX)" appended to it. However, under Sql Server
Agent properties, in the Job System tab, in the Job Execution box, an MSX
server is named.
"Sue Hoegemeier" wrote:

> So was this server set up for MSX (multiserver administration)? Is it
> still suppose to be set up for this? Or did you rename the server?
> -Sue
> On Tue, 5 Oct 2004 05:29:07 -0700, "Ed" <Ed@.discussions.microsoft.com>
> wrote:
>
>
|||Try Right clicking on SQL Server Agent, select Multi Server
Administration, and then select Defect from MSX.
This should remove the server as a target server from the master
server. That's basically where your problems are - the server is setup
as a target server for MSX.
-Sue
On Tue, 5 Oct 2004 08:39:12 -0700, "Ed" <Ed@.discussions.microsoft.com>
wrote:
[vbcol=seagreen]
>I might have done something at one point (not sure what), but the server is
>NOT now supposed to be set up for MSX. In Enterprise Manger, the Sql Server
>Agent label does NOT have "(MSX)" appended to it. However, under Sql Server
>Agent properties, in the Job System tab, in the Job Execution box, an MSX
>server is named.
>"Sue Hoegemeier" wrote:
|||Unfortunately, the only options listed are "Make this a Master" or "Make this
a Target". The option you suggested is not presented.
"Sue Hoegemeier" wrote:

> Try Right clicking on SQL Server Agent, select Multi Server
> Administration, and then select Defect from MSX.
> This should remove the server as a target server from the master
> server. That's basically where your problems are - the server is setup
> as a target server for MSX.
> -Sue
> On Tue, 5 Oct 2004 08:39:12 -0700, "Ed" <Ed@.discussions.microsoft.com>
> wrote:
>
>

2 comments:

Forrest said...

I have had this problem and defecting is a real pain since you will need to set all your jobs to go to this target again when you reenlist. I've never found much documentation on this problem, except here... so I'll post what seems to work for me.

On the master server, go to agent >muti-server admin> manage target servers> go to the "download instructions" tab and then probably sort by "Date Downloaded" You will see some that have never downloaded...just delete those entries. That seems to clear out the "blocking" changes. Then go make sure your job is set to the target or not..if deleted...and then make sure the target picks up the changes. You might need to toggle the instance as a target or not in the job definition on the master...to help it along etc

i actually create a job on the master server to watch for this..maybe there is a PBM way to do this, but for now I just run a local job on the master to.
set @foundcount=(
select count(*) from msdb.dbo.sysdownloadlist
inner join msdb.dbo.sysjobs on sysjobs.job_id=sysdownloadlist.[object_id]
where date_posted < dateadd(MINUTE,-15,GETDATE())
and status=0)

if @foundcount>0 send me an email via sp_send_dbmail

Dennis said...

I use this to fix this condition automatically:

DECLARE @target_server varchar(255)
DECLARE DamagedServers CURSOR FAST_FORWARD FOR
select distinct target_server from msdb.dbo.sysdownloadlist
where date_posted < dateadd(MINUTE,-15,GETDATE())
and status=0

OPEN DamagedServers
FETCH NEXT FROM DamagedServers INTO @target_server

WHILE @@FETCH_STATUS =0
BEGIN
EXEC MSDB.dbo.sp_resync_targetserver @target_server

FETCH NEXT FROM target_server INTO @target_server
END

CLOSE DamagedServers
DEALLOCATE DamagedServers

Post a Comment