How can I set myself as owner of a database ? just using sql As I want to view dependencies of just a couple of tables in my clients database I want to set myself as the owner of the database.

If the database is called MyDatabase and my userName is MyDomain\MyUserName
How do I use the ALTER AUTHORIZATION statement to set myself as Owner ?
Check this links and references:
http://technet.microsoft.com/en-us/library/ms178630.aspx

Example:

EXEC sp_changedbowner 'Albert'


and ALTER AUTHORIZATION

ALTER AUTHORIZATION ON OBJECT::Parts.Sprockets TO MichikoOsada;
GO


http://technet.microsoft.com/en-us/library/ms187359(v=sql.105).aspx