This is an archive version of the document. To get the most up-to-date information, see the current version.

Switch-VESQLIRDatabase

Short Description

Performs switchover of a published Microsoft SQL Server database.

Applies to

Veeam Backup & Replication

Product Edition: Enterprise, Enterprise Plus, Veeam Universal License

Syntax

Switch-VEORIRDatabase [-Database] <VEORIRDatabase>  [<CommonParameters>]

Detailed Description

This cmdlet performs a manual switchover of a published Microsoft SQL Server database. You can perform a switchover after all database files are copied to the target server and the cache file is synchronized. For more information on the switchover option, see the Switchover section of the Veeam Explorers Guide.

Run the New-VESQLIRSwitchOverOptions cmdlet to define the switchover option settings.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Database

Specifies a Microsoft SQL Server database. The cmdlet will switchover this database.

Accepts the VESQLIRDatabase object. To get this object, run the Get-VESQLIRDatabase cmdlet.

True

0

True (ByValue)

<CommonParameters>

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

Examples

Example 1. Starting Switchover of Published Microsoft SQL Server Database

This example shows how to perform a manual switchover of the fiscal database.

$IRDatabase = Get-VESQLIRDatabase -DatabaseName "fiscal"

Switch-VESQLIRDatabase -Database $IRDatabase

Perform the following steps:

  1. Run the Get-VESQLIRDatabase cmdlet. Specify the DatabaseName parameter value. Save the result to the $IRDatabase variable.
  2. Run the Switch-VESQLIRDatabase cmdlet. Set the $IRDatabase variable as the Database parameter value.

Related Commands

Get-VESQLIRDatabase