Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Server.EnumObjectPermissions Method (String)


Enumerates a list of object permissions for a specified grantee on the application instance of SQL Server.

Namespace:   Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

No code example is currently available or this language may not be supported.


Type: System.String

A String value that specifies the grantee.

Return Value

Type: Microsoft.SqlServer.Management.Smo.ObjectPermissionInfo[]

An array of ObjectPermissionInfo objects that contains object permission information for the specified grantee on the instance of SQL Server.


Server srv = new Server("(local)");
ObjectPermissionInfo[] oPI = srv.EnumObjectPermissions(grantee);
foreach (ObjectPermissionInfo op in oPI)


$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$oPI = $srv.EnumObjectPermissions(grantee)
foreach ($op in $oPI)
   Write-Host $op
Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft