Server.EnumObjectPermissions Método
Enumerates a list of object permissions for the instance of SQL Server.
Espacio de nombres: Microsoft.SqlServer.Management.Smo
Ensamblado: Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)
Sintaxis
'Declaración
Public Function EnumObjectPermissions As ObjectPermissionInfo()
'Uso
Dim instance As Server
Dim returnValue As ObjectPermissionInfo()
returnValue = instance.EnumObjectPermissions()
public ObjectPermissionInfo[] EnumObjectPermissions()
public:
array<ObjectPermissionInfo^>^ EnumObjectPermissions()
member EnumObjectPermissions : unit -> ObjectPermissionInfo[]
public function EnumObjectPermissions() : ObjectPermissionInfo[]
Valor devuelto
Tipo: array<Microsoft.SqlServer.Management.Smo.ObjectPermissionInfo[]
An array of ObjectPermissionInfo objects that contains object permission information for the instance of SQL Server.
Ejemplos
C#
Server srv = new Server("(local)");
ObjectPermissionInfo[] oPI = srv.EnumObjectPermissions();
foreach (ObjectPermission op in oPI[])
{
Console.WriteLine(op.ToString());
}
PowerShell
$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$oPI = $srv.EnumObjectPermissions()
foreach ($op in $oPI)
{
Write-Host $op
}
Vea también
Referencia
Sobrecarga de EnumObjectPermissions
Espacio de nombres Microsoft.SqlServer.Management.Smo