I recently installed some tables via SQL Query Analyzer under a user id that was not 'dbo'. I needed to change the owner on the tables and wrote this simple query to generate the execute statements to change the owner. Run the query to generate the next query -- so you can review the list prior to running it.
SELECT 'exec sp_changeobjectowner ''' + name + ''', ''dbo'''
FROM sysobjects
WHERE type = 'U'
AND uid != 1
ORDER BY name
The result looks something like:
exec sp_changeobjectowner 'asset', 'dbo'
exec sp_changeobjectowner 'project', 'dbo'
exec sp_changeobjectowner 'salesorder', 'dbo'