مشاركة عبر


AvailabilityDatabase.ResumeDataMovement Method

Resumes the data movement on this availability database.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public Sub ResumeDataMovement
'Usage
Dim instance As AvailabilityDatabase

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

Remarks

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();
}

See Also

Reference

AvailabilityDatabase Class

Microsoft.SqlServer.Management.Smo Namespace