Posted by Erland Sommarskog on 06/30/05 13:37
jsfromynr (jatinder.singh@clovertechnologies.com) writes:
> It worked, I have another problem
> by mistake I created all of my table in a user not as SA.so I tried
> this to change the ownership
>
> select 'EXEC sp_changeobjectowner oldusername'+
> char(39)+name+char(39)+','+ char(39) +'dbo'+char(39) from sysobjects
> where uid=6 {old user's ID}
>
>
> It works but I am looking for some easy methods
It can't get any easier than that!
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
[Back to original message]
|