This is not an original script - but one I modified from an article by Darren Green on databasejournal.com (02/21/2000). His original script changed the owner of all DTS packages owned by @old_owner to be owned by @new_owner.
This script will change the owner of the most recent version of a specific DTS package (@p_name) to be owned by @new_owner.
The stored procedure should be placed in the msdb database and executed from that database. Example command is:
EXEC sp_DTSReplaceOwner
@p_name = 'package name',
@new_owner = 'MyDomain\OwnerName'
Harnessing SQL Server Metadata- Disabling and Rebuilding Indexes
When doing bulk data changes it may be beneficial to disable indexes prior to starting the operation. Fortunately, SQL's rich metadata makes this very easy to automate in a robust fashion.
2018-05-18 (first published: 2015-10-19)
4,855 reads