Friday, February 10, 2012

Change maintenance plan owner

I would like to change the owner of several maintenance plans. I can't seem
to find a way to that without recreating each plan while connected as the new
owner. Is there a method similar to changing a job's owner via the job's
properties or a database's by sp_changedbowner?
ThanksJim,
Sorry, I don't know a neat way to change the maintenance plan owner. (In
SQL Server 2000, you can go through the process to modify system tables and
change the 'owner' column of msdb.dbo.sysdbmaintplans (although I don't
recommend it) but in SQL Server 2005 that avenue has been closed.)
You can, of course, change the job owner that runs the maintenance plan as
you already described. Is there a reason that the maintenance plan owner
needs to be changed? What side effects are you experiencing?
RLF
"Jim Early" <JimEarly@.discussions.microsoft.com> wrote in message
news:DF28A436-C2D0-4F86-9BC7-5591A164A464@.microsoft.com...
>I would like to change the owner of several maintenance plans. I can't
>seem
> to find a way to that without recreating each plan while connected as the
> new
> owner. Is there a method similar to changing a job's owner via the job's
> properties or a database's by sp_changedbowner?
> Thanks|||Changing the owner of the job only works until the maintenance plan is
modified, then the jobs reverts back to the owner of the maintenance plan.
You might review this article:
http://sqlblogcasts.com/blogs/acalvett/archive/2007/12/30/the-job-whose-owner-kept-coming-back.aspx
"Russell Fields" wrote:
> Jim,
> Sorry, I don't know a neat way to change the maintenance plan owner. (In
> SQL Server 2000, you can go through the process to modify system tables and
> change the 'owner' column of msdb.dbo.sysdbmaintplans (although I don't
> recommend it) but in SQL Server 2005 that avenue has been closed.)
> You can, of course, change the job owner that runs the maintenance plan as
> you already described. Is there a reason that the maintenance plan owner
> needs to be changed? What side effects are you experiencing?
> RLF
> "Jim Early" <JimEarly@.discussions.microsoft.com> wrote in message
> news:DF28A436-C2D0-4F86-9BC7-5591A164A464@.microsoft.com...
> >I would like to change the owner of several maintenance plans. I can't
> >seem
> > to find a way to that without recreating each plan while connected as the
> > new
> > owner. Is there a method similar to changing a job's owner via the job's
> > properties or a database's by sp_changedbowner?
> >
> > Thanks
>
>|||Interesting. Thanks, RLF
"jed" <jed@.discussions.microsoft.com> wrote in message
news:96DC37A2-DD29-4EE2-A89D-F24A8DC41981@.microsoft.com...
> Changing the owner of the job only works until the maintenance plan is
> modified, then the jobs reverts back to the owner of the maintenance plan.
> You might review this article:
> http://sqlblogcasts.com/blogs/acalvett/archive/2007/12/30/the-job-whose-owner-kept-coming-back.aspx
> "Russell Fields" wrote:
>> Jim,
>> Sorry, I don't know a neat way to change the maintenance plan owner. (In
>> SQL Server 2000, you can go through the process to modify system tables
>> and
>> change the 'owner' column of msdb.dbo.sysdbmaintplans (although I don't
>> recommend it) but in SQL Server 2005 that avenue has been closed.)
>> You can, of course, change the job owner that runs the maintenance plan
>> as
>> you already described. Is there a reason that the maintenance plan owner
>> needs to be changed? What side effects are you experiencing?
>> RLF
>> "Jim Early" <JimEarly@.discussions.microsoft.com> wrote in message
>> news:DF28A436-C2D0-4F86-9BC7-5591A164A464@.microsoft.com...
>> >I would like to change the owner of several maintenance plans. I can't
>> >seem
>> > to find a way to that without recreating each plan while connected as
>> > the
>> > new
>> > owner. Is there a method similar to changing a job's owner via the
>> > job's
>> > properties or a database's by sp_changedbowner?
>> >
>> > Thanks
>>|||I encountered the same issue with the Maintenance Plan, when I made a change
to the MaintPlan, the Job changed to that of the owner of the MaintPlan.
According to some reading I have been doing, there really isnâ't a way to
change the Maintenance Plan Owner yet, I do understand why the MaintPlan
owner needs to be changed. In my case, the old DBA has been moved to another
section and no longer have rights to the SQL Server yet, when a change is
made to the MaintPlan, the job defaults to his name and the job fails. Also,
if the person is no longer an employee of the company yet, he created the
plans under his account, the MaintPlan defaults to his account or the account
he used when in SQL.
What I did to change the Owner of all Maintenance Plans in SQL 2005 was, if
you use windows authentication in SQL â'run asâ' the SQL account that is the
manager of SQL or connect to SQL using the SQL Account that manages your SQL.
From there, modify the Maintenance Plan, such as rename it, then rename it
back; the MaintPlan will assume the account you are using as the â'ownerâ'.
This may be tedious but it worksâ?¦
"Jim Early" wrote:
> I would like to change the owner of several maintenance plans. I can't seem
> to find a way to that without recreating each plan while connected as the new
> owner. Is there a method similar to changing a job's owner via the job's
> properties or a database's by sp_changedbowner?
> Thanks|||/*Here's how to change the owner of a maintenance plan to dbo in SQL Server
2005*/
--to find the name and owner of the maintenance plan
--select * from msdb.dbo.sysdtspackages90
--to find the sid you want to use for the new owner
--select * from sysusers
UPDATE
[msdb].[dbo].[sysdtspackages90]
SET
[ownersid] = 0x01
WHERE
[name] = 'MaintenancePlan'|||/*Here's how to change the owner of a maintenance plan to dbo in SQL Server
2005*/
--to find the name and owner of the maintenance plan
--select * from msdb.dbo.sysdtspackages90
--to find the sid you want to use for the new owner
--select * from sysusers
UPDATE
[msdb].[dbo].[sysdtspackages90]
SET
[ownersid] = 0x01
WHERE
[name] = 'MaintenancePlan'
"Jim Early" wrote:
> I would like to change the owner of several maintenance plans. I can't seem
> to find a way to that without recreating each plan while connected as the new
> owner. Is there a method similar to changing a job's owner via the job's
> properties or a database's by sp_changedbowner?
> Thanks

No comments:

Post a Comment