共用方式為


AvailabilityDatabase.ResumeDataMovement 方法

Resumes the data movement on this availability database.

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

語法

'宣告
Public Sub ResumeDataMovement
'用途
Dim instance As AvailabilityDatabase

instance.ResumeDataMovement()
public void ResumeDataMovement()
public:
void ResumeDataMovement()
member ResumeDataMovement : unit -> unit
public function ResumeDataMovement()

備註

Data movement on this availability database may not yet have resumed after a call to ResumeDataMovement() returns control to the program. The following code snippet suggests one way to pause program execution until data movement on this availability database resumes:

Server server = new Server("PrimaryServerName");
AvailabilityGroup ag = server.AvailabilityGroups["AgName"];
AvailabilityDatabase dbToResume = ag.AvailabilityDatabases["DbName"];
dbToResume.ResumeDataMovement();
while (dbToResume.IsJoined) {
    Thread.Sleep(5000);
    dbToResume.Refresh();
}

請參閱

參考

AvailabilityDatabase 類別

Microsoft.SqlServer.Management.Smo 命名空間