Sunday, March 11, 2012

Can't delete job

When attempt to delete a job, the following error is
encountered:
Cannot add, update, or delete a job (or its steps or
schedules) that originated from an MSX server.
How would you reslove this?
Thanks,
BenDo you have master-target server configuration setup? If not, did you
recently rename your SQL Server?
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Ben" <bluebells88@.yahoo.com> wrote in message
news:379601c3fdd4$05d89540$a001280a@.phx.gbl...
When attempt to delete a job, the following error is
encountered:
Cannot add, update, or delete a job (or its steps or
schedules) that originated from an MSX server.
How would you reslove this?
Thanks,
Ben|||Sorry, what is 'master-target server configuration
setup'?
The machine joined a domain group after the job is
created.
Thanks,
Ben

>--Original Message--
>Do you have master-target server configuration setup? If
not, did you
>recently rename your SQL Server?
>--
>HTH,
>Vyas, MVP (SQL Server)
>http://vyaskn.tripod.com/
>Is .NET important for a database professional?
>http://vyaskn.tripod.com/poll.htm
>
>"Ben" <bluebells88@.yahoo.com> wrote in message
>news:379601c3fdd4$05d89540$a001280a@.phx.gbl...
>When attempt to delete a job, the following error is
>encountered:
>Cannot add, update, or delete a job (or its steps or
>schedules) that originated from an MSX server.
>How would you reslove this?
>Thanks,
>Ben
>
>.
>|||You probably have incorrect machine name in msdb..sysjobs. The old machine
name is still in msdb..sysjobs. Since you changed the machine name, SQLAgent
now thinks that this job is owned by a master server. You can change
the machine names for all jobs with below SQL Statement. Warning: Hacking
system tables is not supported and should be done with care (below should be
rather safe, though).
DECLARE @.srv sysname
SET @.srv = CAST(SERVERPROPERTY('ServerName') AS sysname)
UPDATE sysjobs SET originating_server = @.srv
NOTE:
If this is a target server (you have jobs sent from a master server), you
have to exclude them, so you don't transfer those jobs into local jobs:
WHERE originating_server = 'oldservname'
If you want to do this the supported way, see below KB article
http://support.microsoft.com/defaul...kb;en-us;281642
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=...ublic.sqlserver
"Ben" <bluebells88@.yahoo.com> wrote in message
news:44ba01c3fe7b$b69c3970$a101280a@.phx.gbl...
> Sorry, what is 'master-target server configuration
> setup'?
> The machine joined a domain group after the job is
> created.
> Thanks,
> Ben
>
> not, did you|||tibor,
I am trying your tip and obviously doing something wrong.
original server name was foxapp
new server name is foxsql
this is what I type but get originating_server not a valid column name?
DECLARE @.srv sysname
SET @.srv = CAST(SERVERPROPERTY('foxsql') AS sysname)
UPDATE sysjobs SET originating_server = @.srv
WHERE orginating_server = 'foxapp'
could you pls tell me what I did wrong thanks
mitch|||You shouldn't replace 'ServerName' inside the function call.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"mitch" <anonymous@.discussions.microsoft.com> wrote in message
news:DE663F9F-66CD-407B-97D9-0B51860DDB1E@.microsoft.com...
> tibor,
> I am trying your tip and obviously doing something wrong.
> original server name was foxapp
> new server name is foxsql
> this is what I type but get originating_server not a valid column name?
> DECLARE @.srv sysname
> SET @.srv = CAST(SERVERPROPERTY('foxsql') AS sysname)
> UPDATE sysjobs SET originating_server = @.srv
> WHERE orginating_server = 'foxapp'
> could you pls tell me what I did wrong thanks
> mitch|||Tibor,
thank you very much!
excellent fix!
mitch

No comments:

Post a Comment