ScriptingOptions.IncludeDatabaseRoleMemberships 属性

Gets or sets a value that indicates whether the database role memberships are included.

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

语法

声明
Public Property IncludeDatabaseRoleMemberships As Boolean 
    Get 
    Set
用法
Dim instance As ScriptingOptions 
Dim value As Boolean 

value = instance.IncludeDatabaseRoleMemberships

instance.IncludeDatabaseRoleMemberships = value
public bool IncludeDatabaseRoleMemberships { get; set; }
public:
property bool IncludeDatabaseRoleMemberships {
    bool get ();
    void set (bool value);
}
member IncludeDatabaseRoleMemberships : bool with get, set
function get IncludeDatabaseRoleMemberships () : boolean 
function set IncludeDatabaseRoleMemberships (value : boolean)

属性值

类型:System.Boolean
True if the database role memberships are included; otherwise, false.

示例

Visual Basic

Dim scOps As New ScriptingOptions()
scOps.IncludeDatabaseRoleMemberships = true

PowerShell

$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions
$scOps.IncludeDatabaseRoleMemberships = $TRUE

请参阅

参考

ScriptingOptions 类

Microsoft.SqlServer.Management.Smo 命名空间

其他资源

脚本撰写