sp_cachestrategy  sp_changegroup

Chapter 1: System Procedures

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.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

Event

Audit option

Command or access audited

Information in extrainfo

38

exec_procedure

Execution of a procedure

  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

See also

Commands create database

System procedures sp_addlogin, sp_dropalias, sp_dropuser, sp_helpdb





Copyright © 2005. Sybase Inc. All rights reserved. sp_changegroup

View this book as PDF