471,049 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,049 software developers and data experts.

Change Object Ownership

A co-worker recently quit the company, and all of his stored
procedures and DTS packages are apparently under his name. Is there
any way to change his account to another (ie administrator or SA)??

I am afraid to delete his account in fear all the stored procedures
will be lost. (we have backups, but ... ugh)

Feb 16 '07 #1
1 2024
berwiki (st**********@gmail.com) writes:
A co-worker recently quit the company, and all of his stored
procedures and DTS packages are apparently under his name. Is there
any way to change his account to another (ie administrator or SA)??

I am afraid to delete his account in fear all the stored procedures
will be lost. (we have backups, but ... ugh)

For the stored procedures do:

SELECT 'EXEC sp_changeobjectowner ''' + name + ''', '''dbo''''
FROM sysobjects
WHERE uid = USER_ID('co-worker')

copy, paste and run result set. This will take care of stored procedures,
tables etc. Note that any references to these procedures from elsewhere will
need to be updated.

I have never worked with DYS, so I cannot answer that part.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Feb 16 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Frank McCown | last post: by
3 posts views Thread by Noloader | last post: by
3 posts views Thread by jakub.pieczonka | last post: by
reply views Thread by Russ Schneider | last post: by
7 posts views Thread by Scott Gifford | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.