Click or drag to resize

Get-DtSourceQueueSnapshot

This cmdlet returns the coordinated snapshot for the specified job. For this cmdlet, the -ServiceHost should be your target server.

Syntax

Get-DtSourceQueueSnapshot [-CorrelationId] <Guid> [-ServiceHost] <Server> [<CommonParameters>]

Parameters
-CorrelationId<Guid>

Specify the correlation ID used to create the coordinated snapshots.

Required?

true

Position?

3

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ServiceHost<Server>

Specify the server object returned from the New-DtServer cmdlet.

Required?

true

Position?

1

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters.

Examples

------------------EXAMPLE------------------

Several variables are set including a unique correlation ID for the snapshots that will be taken as well as URI identifiers for the source servers of existing jobs. A server object is created for the server beta using the domain\administrator and password credentials. It assigns the server object to the variable called DtServerObjectBeta. The jobs are retrieved from DtServerObjectBeta, and the job information is inserted into unique variables. And array of job IDs is then created. A coordinated snapshot is taken using the specified correlation ID and the jobs stored in the array. Only those jobs will have coordinated snapshots. Then the coordinated snapshot for the specified correlation ID and job ID is returned. The connections for the server object are then closed.

$CorId=New-Guid

$Source1Uri = "dtms://112.42.7.63:6325/"

$Source2Uri = "dtms://112.42.7.71:6325/"

$DtServerObjectBeta = New-DtServer -Name beta -UserName domain\administrator -Password password

$DtJob1 = Get-DtJob -ServiceHost $DtServerObjectBeta | Where-Object { $_.SourceHostUri -eq $Source1Uri}

$DtJob2 = Get-DtJob -ServiceHost $DtServerObjectBeta | Where-Object { $_.SourceHostUri -eq $Source2Uri}

$DtJobsArray = New-Object "System.Collections.Generic.List[Guid]"

$DtJobsArray.Clear()

$DtJobsArray.Add($DtJob1.Id)

$DtJobsArray.Add($DtJob2.Id)

Checkpoint-DtConnectionSourceQueue -ServiceHost $DtServerObjectBeta -CorrelationId $CorId -JobIds $DtJobsArray.ToArray()

Get-DtSourceQueueSnapshot -ServiceHost $DtServerObjectBeta -CorrelationId $CorId -JobIds $DtJob1.Id

Disconnect-DtServer -ServiceHost $DtServerObjectBeta