共用方式為


Restore.ToPointInTime 屬性

Gets or sets the endpoint for database log restoration.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.SmoExtended (在 Microsoft.SqlServer.SmoExtended.dll 中)

語法

'宣告
Public Property ToPointInTime As String 
    Get 
    Set
'用途
Dim instance As Restore 
Dim value As String 

value = instance.ToPointInTime

instance.ToPointInTime = value
public string ToPointInTime { get; set; }
public:
property String^ ToPointInTime {
    String^ get ();
    void set (String^ value);
}
member ToPointInTime : string with get, set
function get ToPointInTime () : String 
function set ToPointInTime (value : String)

屬性值

型別:System.String
A string that specifies the date and time values that identify the endpoint.

備註

The ToPointInTime property is evaluated only when using a Restore object to recover a database transaction log.

範例

The following code example sets a date and time at which the restore operation halts.

VB

Dim rs As Restore
rs = New Restore
rs.ToPointInTime = "Apr 15, 2020 12:00 AM"

PowerShell

$rs = new-object Microsoft.SqlServer.Management.Smo.Restore
$rs.ToPointInTime = "Apr 15, 2020 12:00 AM"

請參閱

參考

Restore 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

RESTORE (Transact-SQL)

SQL Server 資料庫的備份與還原