Monday, March 19, 2012

How to change a local DTS package's owner or how to open a password protected package.

Hi,
In our database server (SQL Server 7.0), there are some local DTS packages,
all were password protected, and we don't know the password, the one who
create them has left the company.
And now, we want to modify them, how to do?
Thanks
FrankLocal packages are held in the msdb database table sysdtspackages. By doing a
simple "SELECT * FROM sysdtspackages" you can see the owner for each package.
Whilst you could probably use a simple UPDATE statement to change the owner,
there is an undocumented stored procedure, that appears to be purpose written
for this task, sp_reassign_dtspackageowner :
sp_reassign_dtspackageowner [@.name =] 'name',
[@.id =] 'id',
[@.newloginname =] 'newloginname'
[@.name =] 'name'
The package name.
[@.id =] 'id'
This is the uniqueidentifier for the package. A name may not necessarily be
unique.
[@.newloginname =] 'newloginname'
The new Owner name. SQL Server login example 'sa', NT Integrated example
'Domain\Username'
If you look at sp_reassign_dtspackageowner you'll notice that it not only
updates the owner text field, but it also updates the owner_sid field.
"Frank" wrote:
> Hi,
> In our database server (SQL Server 7.0), there are some local DTS packages,
> all were password protected, and we don't know the password, the one who
> create them has left the company.
> And now, we want to modify them, how to do?
> Thanks
> Frank
>
>

No comments:

Post a Comment