Permission Impersonation

If you are the database owner, you can impersonate another user who owns objects in the database. This allows you to grant and revoke permissions on those objects. If you are the system administrator, you can create objects that will be owned by another user.

With the SETUSER statement, a database owner can impersonate another user's identity and permission status in the current database. The SETUSER statement allows a database owner to access an object owned by another user, to grant permissions on an object owned by another user, to create an object that will be owned by another user, and to temporarily take on the permissions of another user. SETUSER permission defaults to the database owner and cannot be transferred.

The SA can use SETUSER to create objects that will be owned by another user and can do so until another SETUSER statement is given. SETUSER allows the SA to take on a user's identity temporarily.

SETUSER is not necessary when you drop objects. The SA and DBO can drop all database objects.

For information about using the SETUSER statement, see the Microsoft SQL Server Transact-SQL Reference.