User.EnumRoles 方法

Enumerates a list of roles of which the database user is a member.

命名空间:  Microsoft.SqlServer.Management.Smo
程序集:  Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)

语法

声明
Public Function EnumRoles As StringCollection
用法
Dim instance As User 
Dim returnValue As StringCollection 

returnValue = instance.EnumRoles()
public StringCollection EnumRoles()
public:
StringCollection^ EnumRoles()
member EnumRoles : unit -> StringCollection
public function EnumRoles() : StringCollection

返回值

类型:System.Collections.Specialized.StringCollection
A StringCollection system object value that specifies the roles of which the database is a member.

示例

管理用户、角色和登录名

请参阅

参考

User 类

Microsoft.SqlServer.Management.Smo 命名空间

其他资源

主体(数据库引擎)

CREATE USER (Transact-SQL)