August 15, 2007 at 12:40 pm
How to change the owner of all the tables and SP's in 2005
I have tead.table1
tead.table2 etc.
How to change this to prg.table1 for entire 100 table.
Nita
August 15, 2007 at 12:53 pm
select
'sp_changeobjectowner ' + ''''+'tead.'+name+'''' + ', ' + '''prg''
GO'
FROM sysobjects
WHERE xtype = 'U'
Output the results to text, then paste the results into a new query window.
August 15, 2007 at 12:53 pm
What he said .
August 15, 2007 at 12:53 pm
EXEC sp_changeobjectowner 'ObjSQL', 'prg'
Just generate the code with a select on the information schema tables.
August 15, 2007 at 1:05 pm
Thanks for help
Nita
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply