다음을 통해 공유


Restore.RestrictedUser 속성

Gets or sets a Boolean property value that specifies whether access to the restored database is restricted to members of the db_owner fixed database role and the dbcreator and sysadmin fixed server roles.

네임스페이스:  Microsoft.SqlServer.Management.Smo
어셈블리:  Microsoft.SqlServer.SmoExtended(Microsoft.SqlServer.SmoExtended.dll)

구문

‘선언
Public Property RestrictedUser As Boolean 
    Get 
    Set
‘사용 방법
Dim instance As Restore 
Dim value As Boolean 

value = instance.RestrictedUser

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

속성 값

유형: System.Boolean
A Boolean value that specifies whether access to the restored database will be restricted.If True, access to the restored database is restricted to the db_owner fixed database role, and the dbcreator and sysadmin fixed server roles. Otherwise, False (default).

The following code example restricts access to the restored database so that only the database owner, database creator, and system administrator may access it.

VB

Dim rs As Restore
rs = New Restore
rs.RestrictedUser = true

PowerShell

$rs = new-object Microsoft.SqlServer.Management.Smo.Restore
$rs.RestrictedUser = $TRUE

참고 항목

참조

Restore 클래스

Microsoft.SqlServer.Management.Smo 네임스페이스

관련 자료

RESTORE(Transact-SQL)

SQL Server 데이터베이스 백업 및 복원