• Data Warehouse Service

dws
  1. Help Center
  2. Data Warehouse Service
  3. Developer Guide
  4. SQL Reference
  5. SQL Syntax
  6. REASSIGN OWNED

REASSIGN OWNED

Function

REASSIGN OWNED changes the owner of a database.

REASSIGN OWNED requires that the system change owners of all the database objects owned by old_roles to new_role.

Precautions

  • REASSIGN OWNED is often executed before deleting a rule.
  • You must have the permissions on the original and target roles to execute it.

Syntax

REASSIGN OWNED BY old_role [, ...] TO new_role;

Parameter Description

  • old_role

    Specifies the role name of the old owner.

  • new_role

    Specifies the role name of the new owner.

Examples

None