Hem / Tips & tricks
SELECT 'exec sp_changeobjectowner ''' + ltrim(u.name) + '.' + ltrim(s.name) + ''',' + '''dbo'''FROM sysobjects s,sysusers uWHERE s.uid = u.uid ANDu.name <> 'dbo' AND xtype in ('V', 'P', 'U') ANDu.name not like 'INFORMATION%'order by s.name