use [currentdatabase]
go
sp_changedbowner 'yourusername', 'true'
go
This will change the owner of the current database to whatever username you want ( you could put sa in there ) and then remap any alias as well (that's the true).
// John Stone
Our programmer has left the company and the tables and views were created with his credential as owner.
How do I change the ownership of all the tables and views using the stored procedure - sp_changedbowner?
Instead of typing the individual table and view name to change the db owner, is there a way to change the owner at once?