sp_changedbowner

Description

Changes the owner of a user database.

Syntax

sp_changedbowner loginame [, true ]

Parameters

loginame

is the login name of the new owner of the current database.

true

transfers aliases and their permissions to the new database owner. Values are “true” and “TRUE”.

Examples

Example 1

Makes the user “albert” the owner of the current database:

sp_changedbowner albert

Usage

Permissions

Only a System Administrator can execute sp_changedbowner.

See also

Commands create database

System procedures sp_addlogin, sp_dropalias, sp_dropuser, sp_helpdb