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 命名空间