Get-VEHANADatabase

Short Description

Returns backed-up SAP HANA databases.

Applies to

Veeam Backup & Replication

Product Edition: Enterprise Plus, Veeam Universal License

Syntax

Get-VEHANADatabase [-System] <VEHANASystem> [-Name <String>] [-Tenant <SwitchParameter>] [<CommonParameters>]

Detailed Description

This cmdlet returns an array of backed-up databases located on the specified SAP HANA system. After you get the backed-up SAP HANA databases, you can use the Restore-VEHANADatabase cmdlet to restore the SAP HANA databases you need.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

System

Specifies the name of the SAP HANA system that the databases reside on. The cmdlet will return the databases on the specified SAP HANA system.

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

True

0

True (ByValue)

Name

Specifies the name of an SAP HANA database. The cmdlet will return the SAP HANA database with the specified name.

String

False

Named

False

Tenant

Defines that the cmdlet returns only the tenant databases on the selected SAP HANA system.

SwitchParameter

False

Named

False

<CommonParameters>

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

Output Object

The cmdlet returns the VEHANADatabase[] object that contains an array of backed-up SAP HANA databases.

Examples

Get-VEHANADatabaseExample 1. Getting all Databases on the Specified System

This example shows how to return all SAP HANA databases on a backed-up SAP HANA system.

$session = Get-VEHANARestoreSession

$system = Get-VEHANASystem -Session $session[0]

$database = Get-VEHANADatabase -System $system

Perform the following steps:

  1. Run the Get-VEHANARestoreSession cmdlet. Save the result to the $session variable.

The cmdlet will return an array of active restore sessions. Note the ordinal number of the necessary restore session. In our example, it is the first restore session in the array.

  1. Run the Get-VEHANASystem cmdlet. Set the $session variable as the Session parameter value and select the necessary restore session. Save the result to the $system variable.
  2. Run the Get-VEHANADatabase cmdlet. Set the $system variable as the System parameter value. Save the result to the $database variable to be able to use it with other cmdlets.

Get-VEHANADatabaseExample 2. Getting all Tenant Databases on the Specified System

This example shows how to return only the tenant databases that reside on the selected SAP HANA system.

$session = Get-VEHANARestoreSession

$system = Get-VEHANASystem -Session $session[0]

$database = Get-VEHANADatabase -System $system -Tenant

Perform the following steps:

  1. Run the Get-VEHANARestoreSession cmdlet. Save the result to the $session variable.

The cmdlet will return an array of active restore sessions. Note the ordinal number of the necessary restore session. In our example, it is the first restore session in the array.

  1. Run the Get-VEHANASystem cmdlet. Set the $session variable as the Session parameter value and select the necessary restore session. Save the result to the $system variable.
  1. Run the Get-VEHANADatabase cmdlet. Set the $system variable as the System parameter value. Provide the Tenant parameter to only return the tenant databases on the selected system. Save the result to the $database variable to be able to use it with other cmdlets.

Get-VEHANADatabaseExample 3. Getting SAP HANA Database with Specified Name

This example shows how to get a specific SAP HANA database using its name.

$session = Get-VEHANARestoreSession

$system = Get-VEHANASystem -Session $session[0]

$database = Get-VEHANADatabase -System $system -Name "Tenant1"

Perform the following steps:

  1. Run the Get-VEHANARestoreSession cmdlet. Save the result to the $session variable.

The cmdlet will return an array of active restore sessions. Note the ordinal number of the necessary restore session. In our example, it is the first restore session in the array.

  1. Run the Get-VEHANASystem cmdlet. Set the $session variable as the Session parameter value and select the necessary restore session. Save the result to the $system variable.
  1. Run the Get-VEHANADatabase cmdlet. Set the $system variable as the System parameter value. Specify the name of the necessary database as the Name parameter value. Save the result to the $database variable to be able to use it with other cmdlets.

Related Commands

Page updated 10/11/2023

Page content applies to build 12.1.1.56