Question :
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 MyDomainMyUserName
How do I use the ALTER AUTHORIZATION statement to set myself as Owner ?
Answer :
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
ALTER AUTHORIZATION ON DATABASE::MyDatabase TO MyUserName;