Permissions Property (SQL-DMO)

The Permissions property returns the database privileges for the current connection.

Applies To

Database Object

Syntax

object.Permissions

Part Description
object Expression that evaluates to an object in the Applies To list

Returns

The return value is a bit-packed long integer, interpreted using this information.

Constant Value Description
SQLDMOPriv_AllDatabasePrivs 65408 All database privileges
SQLDMOPriv_CreateDatabase 256 Can create and own databases
SQLDMOPriv_CreateDefault 4096 Can create DEFAULT objects
SQLDMOPriv_CreateProcedure 1024 Can create and own stored procedure objects
SQLDMOPriv_CreateRule 16384 Can create rule objects
SQLDMOPriv_CreateTable 128 Can create and own base tables
SQLDMOPriv_CreateView 512 Can create and own view tables
SQLDMOPriv_DumpDatabase 2048 Can back up a database
SQLDMOPriv_DumpTransaction 8192 Can back up a database transaction log
SQLDMOPriv_Unknown 0 No privilege assigned or unable to determine privilege on the referenced database or database object

Remarks

Configure database permission by using the Grant, Revoke, and Deny methods.

Data Type

Long, enumerated

Modifiable

Read-only

Prototype (C/C++)

HRESULT GetPermissions(SQLDMO_PRIVILEGE_TYPE* pRetVal);

See Also
Deny Method (Database) Revoke Method (Database)
Grant Method (Database)  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.