Export (0) Print
Expand All

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)

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

Community Additions

ADD
Show:
© 2014 Microsoft