Unpublish-VESQLDatabase
Short Description
Unpublishes Microsoft SQL databases from the target SQL server.
Applies to Veeam Backup & Replication
Product Edition: Community, Standard, Enterprise, Enterprise Plus
Syntax
Detailed Description
This cmdlet unpublishes Microsoft SQL databases from the target SQL server.
Parameters
Parameter | Description | Type | Required | Position | Accept Pipeline Input | Accept Wildcard Characters |
---|---|---|---|---|---|---|
Database | Specifies the Microsoft SQL database. The cmdlet will unpublish this database from the target SQL server. | Accepts the VESQLPublishedDatabase type. To get this object, run the Get-VESQLPublishedDatabase cmdlet. | True | 0 | True (ByValue) | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Docs.
Examples
Unpublishing Microsoft SQL Database
This example shows how to unpublish a Microsoft SQL database.
$session = Get-VESQLRestoreSession $database = Get-VESQLPublishedDatabase -Session $session[0] -Name "SQLDatabase" Unpublish-VESQLDatabase -Database $database |
Perform the following steps:
- Run the Get-VESQLRestoreSession cmdlet. Save the result to the $session variable.
The Get-VESQLRestoreSession cmdlet will return an array of restore sessions. Mind the ordinal number of the necessary restore session (in our example, it is the first restore session in the array).
- Run the Get-VESQLPublishedDatabase cmdlet. Set the $session variable as the Session parameter value. Specify the Name parameter value. Save the result to the $database variable.
- Run the Unpublish-VESQLDatabase cmdlet. Set the $database variable as the Database parameter value.
Related Commands