This seemed to work correctly, but I am sure someone could have done it
better... You can leave off the versionid info if you want all of the
versions changed (or just use the name = 'dtspackagename' column in
sysdtspackages instead of the id = 'SOMEGUID').
Be careful, use at your own risk, I'm sure a problem would introduce
itself if used with invalid data.. Normal precautions apply.. Test in
a test environment, etc, etc, blah, blah. Good luck.
-------------------------
declare @name varchar(128)
declare @sid binary
select @sid = sid,@name = name from master.dbo.syslogins where name =
'domain\username' --or sql user name
update msdb.dbo.sysdtspackages
SET owner_sid = @sid,
owner = @name
from msdb.dbo.sysdtspackages where id =
'619FEEC7-2444-4FF0-BCD0-E6B02D888A04' -- id of package
and versionid =
'5DFB9745-C13D-41DD-8FC7-E6F139AB36CB' -- version of package
> -----Original Message-----
> From: Steve Brownlee
> [mailto:mssqldba-ezmlmshield-x54170573.[Email address protected]
> Sent: Thursday, June 29, 2006 12:39 PM
> To: LazyDBA Discussion
> Subject: Object Owner
>
> Is there a way to change the owner of a DTS package without
> deleting it and recreating it?
>
>
> ---------------------------------------------------------------------
> TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
> Website : http://www.LazyDBA.com To unsubscribe:
> http://www.lazydba.com/unsubscribe.html
>
>
>
>
MS Sql Server LazyDBA home page