AvailabilityDatabase.SuspendDataMovement 메서드

Suspends the data movement on this availability database.

네임스페이스:  Microsoft.SqlServer.Management.Smo
어셈블리:  Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)

구문

‘선언
Public Sub SuspendDataMovement
‘사용 방법
Dim instance As AvailabilityDatabase

instance.SuspendDataMovement()
public void SuspendDataMovement()
public:
void SuspendDataMovement()
member SuspendDataMovement : unit -> unit
public function 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"];
dbToSuspend.SuspendDataMovement();
while (!dbToSuspend.IsSuspended) {
    Thread.Sleep(10000);
    dbToSuspend.Refresh();
}

참고 항목

참조

AvailabilityDatabase 클래스

Microsoft.SqlServer.Management.Smo 네임스페이스