Hi,
Another thread had the following, for tables. Is there something like this for views?
from another thread:
The followig script changes the table owner for all tables in the current database to 'dbo' if not already 'dbo'. The script uses the undocumented system stored procedure sp_msforeachtable.
exec sp_msforeachtable
'If left(''?'',charindex(''.'',''?'')-1)<>''[dbo]''
exec sp_changeobjectowner ''?'',''dbo'''
thanks,
Ray
Another thread had the following, for tables. Is there something like this for views?
from another thread:
The followig script changes the table owner for all tables in the current database to 'dbo' if not already 'dbo'. The script uses the undocumented system stored procedure sp_msforeachtable.
exec sp_msforeachtable
'If left(''?'',charindex(''.'',''?'')-1)<>''[dbo]''
exec sp_changeobjectowner ''?'',''dbo'''
thanks,
Ray