--- title: "Get-VESQLIRDatabase" description: "Returns Microsoft SQL Server databases that are published within an instant recovery session. Product: Veeam Backup & Replication Product Edition: Enterprise, Enterprise Plus, Veeam Universal License This cmdlet returns an array of backed-up Microsof" canonical: "https://helpcenter.veeam.com/docs/vbr/explorers_powershell/get-vesqlirdatabase.html" breadcrumb: "Veeam Explorers PowerShell Reference > Veeam Explorers PowerShell Reference > Veeam Explorer for Microsoft SQL Server > Get-VESQLIRDatabase" dateModified: "2026-08-20" --- # Get-VESQLIRDatabase ## Short Description Returns Microsoft SQL Server databases that are published within an instant recovery session. **Product**: Veeam Backup & Replication **Product Edition**: Enterprise, Enterprise Plus, Veeam Universal License ## Syntax ``` Get-VESQLIRDatabase [[-DatabaseName] ] [] ``` ## Detailed Description This cmdlet returns an array of backed-up Microsoft SQL Server databases that are published within an instant recovery session. After you get the published Microsoft SQL Server databases within an instant recovery session, you can perform the following operations with these databases: - [`Switch-VESQLIRDatabase`](switch-vesqlirdatabase.md) - [`Set-VESQLIRDatabase`](set-vesqlirdatabase.md) - [`Stop-VESQLInstantRecovery`](stop-vesqlinstantrecovery.md) ## Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

DatabaseName

Specifies a Microsoft SQL Server database name. The cmdlet will return an array of databases with the specified name.

String

False

0

False

`` This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the [About Common Parameters](http://go.microsoft.com/fwlink/p/?LinkID=113216) section of Microsoft Learn. ## Output Object The cmdlet returns the [`VESQLIRDatabase`](vesqlirdatabase.md)`[]` array that contains Microsoft SQL Server databases that are published within an instant recovery session. ## Examples ::: example ### Example 1. Getting All Microsoft SQL Server Databases Published Within Instant Recovery Session This command returns a list of all published Microsoft SQL Server databases within an instant recovery session. Save the result to the `$IRDatabase` variable to be able to use it with other cmdlets. ``` $IRDatabase = Get-VESQLIRDatabase ``` ::: ::: example ### Example 2. Getting Microsoft SQL Server Databases with Specific Name Published Within Instant Recovery Session This command returns all Microsoft SQL Server databases with the specified name published within an instant recovery session. Save the result to the `$IRDatabase` variable to be able to use it with other cmdlets. ``` $IRDatabase = Get-VESQLIRDatabase -DatabaseName "db1" ``` :::