This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
The SetOwner method reassigns ownership for a Microsoft SQL Server database.
The TransferAliases argument is maintained for compatibility with earlier versions of SQL Server security relying on aliases to assign permissions. For database ownership permissions based on membership in the db_owner role, the argument can be ignored safely. Set TransferAliasesusing:
TRUE. Logins aliased to the login of the current database owner are realiased to reference the new owner.
FALSE (default). No change is made in alias logins.
Set OverrideIfAlreadyUser using:
TRUE. A user existing in the database and mapped to the login that will assume ownership is dropped prior to the change in ownership.
FALSE (default). No change in user definition is made. If the login that will assume ownership is mapped to an existing user, the method fails.