Export (0) Print
Expand All

AvailabilityDatabase.SuspendDataMovement Method

Suspends the data movement on this availability database.

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

public void SuspendDataMovement()

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

Server server = new Server("PrimaryServerName");
AvailabilityGroup ag = server.AvailabilityGroups["AgName"];
AvailabilityDatabase dbToSuspend = ag.AvailabilityDatabases["DbName"];
while (!dbToSuspend.IsSuspended) {
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft