New-VESQLIRSwitchOverOptions

In this article

    Short Description

    Defines the switchover option that you can apply to the instant recovery session of Microsoft SQL Server databases.

    Applies to Veeam Backup & Replication

    Product Edition: Enterprise, Enterprise Plus, Veeam Universal License

    Syntax

    This cmdlet allows you to:

    • Create a switchover option that starts the switchover at a specified date and time.

    New-VESQLIRSwitchOverOptions -Scheduled -SwitchingTimeUtc <datetime> [<CommonParameters>]

    • Create a switchover option that starts the switchover immediately after database files are copied and synchronized.

    New-VESQLIRSwitchOverOptions -Auto [<CommonParameters>]

    • Create a switchover option that allows you to start the switchover manually at any time after database files are copied and synchronized.

    New-VESQLIRSwitchOverOptions -Manual [<CommonParameters>]

    Detailed Description

    This cmdlet creates the VESQLIRSwitchOverOptions object that defines a switchover option that you can apply to the instant recovery session of Microsoft SQL Server databases. You can use this option to create a switchover option and define a schedule for a scheduled switchover.

    Parameters

    Parameter

    Description

    Type

    Required

    Position

    Accept Pipeline Input

    Auto

    Defines that the switchover will be performed in the Auto mode.

    SwitchParameter

    True

    Named

    False

    Manual

    Defines that the switchover will be performed manually.

    SwitchParameter

    True

    Named

    False

    Scheduled

    Defines that the switchover will be performed in the Scheduled mode.

    SwitchParameter

    True

    Named

    False

    SwitchingTimeUtc

    For the scheduled switchover option.

    Specifies the date and time when the switchover must be started.

    DateTime

    True

    Named

    False

    <CommonParameters>

    This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Docs.

    Output Object

    The cmdlet returns the VESQLIRSwitchOverOptions object that contains a switchover option with the defined schedule.

    Examples

    New-VESQLIRSwitchOverOptionsExample 1. Defining Scheduled Switchover Option

    This example shows how to define a scheduled switchover option. The switchover schedule is set to 2020-11-24 13:00:00.

    $time = Get-Date -Date "2020-11-24 13:00:00"

    $TimeUtc = $time.ToUniversalTime()

    $ScheduledSwitch = New-VESQLIRSwitchOverOptions -Scheduled -SwitchingTimeUtc $TimeUtc

    Perform the following steps:

    1. Run the Get-Date cmdlet and specify the date and time when the switchover must be performed. Save the result to the $time variable.
    2. Convert the scheduled time to the UTC format using the ToUniversalTime() mehod. Save the result to the $TimeUtc variable.
    3. Run the New-VESQLIRSwitchOverOptions cmdlet. Provide the Scheduled parameter. Set the $TimeUtc variable as the SwitchingTimeUtc parameter value.

    New-VESQLIRSwitchOverOptionsExample 2. Defining Auto Switchover Option

    This command defines an auto switchover option. The switchover will run immediately after database files are copied and synchronized.

    $ManualSwitch = New-VESQLIRSwitchOverOptions -Auto

    New-VESQLIRSwitchOverOptionsExample 3. Defining Manual Switchover Option

    This command defines a manual switchover option. The switchover will run at any time after database files are copied and synchronized.

    $ManualSwitch = New-VESQLIRSwitchOverOptions -Manual

    I want to report a typo

    There is a misspelling right here:

     

    I want to let the Veeam Documentation Team know about that.