The Get-CVSQLDatabase
cmdlet retrieves a list of SQL databases in your CommCell environment.
Before you can use this cmdlet, you must log on to your CommCell environment using the Connect-CVServer
cmdlet. For more information, see Connecting to a CommCell Environment with PowerShell.
Syntax
Get-CVSQLDatabase [-SortColumn {bkpTime | bkpSize | insName | dbName | cName | planName}] [-SortDescending] [-OnlySLA] [-ShowSysDB] [-AllProperties] [-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]
Get-CVSQLDatabase [-Name <String>] [-ClientName <String>] [-InstanceName <String>] [-SortColumn {bkpTime | bkpSize | insName | dbName | cName | planName}] [-SortDescending] [-OnlySLA] [-ShowSysDB] [-AllProperties] [-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]
Get-CVSQLDatabase [-Id <Int32>] [-InstanceId <Int32>] [-SortColumn {bkpTime | bkpSize | insName | dbName | cName | planName}] [-SortDescending] [-OnlySLA] [-ShowSysDB] [-AllProperties] [-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]
Get-CVSQLDatabase [-InstanceObject <Object>] [-SortColumn {bkpTime | bkpSize | insName | dbName | cName | planName}] [-SortDescending] [-OnlySLA] [-ShowSysDB] [-AllProperties] [-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]
Optional Parameters
Commvault Parameters
Parameter | Description | Data type | Values | Accepts pipeline input? | Accepts wildcard characters? | Type of parameter |
---|---|---|---|---|---|---|
| The name of the subclient to get databases for. | String | No | No | Named | |
| The ID of the subclient to get databases for. | Int32 | The default value is 0. | No | No | Named |
| The name of the client to get databases for. | String | No | No | Named | |
| The name of the instance to get databases for. | String | No | No | Named | |
| The ID of the instance to get databases for. | Int32 | The default value is 0. | No | No | Named |
| The object that represents the instance to get databases for. | Object | True, by:
| No | Named | |
| The column to sort the databases by. | Enumerated | Valid values:
| No | No | Named |
| Sorts the databases in descending order. | SwitchParameter | No | No | Named | |
| Lists only databases that have missed Service Level Agreements (SLAs). | SwitchParameter | No | No | Named | |
| Includes system databases in the output. | SwithchParameter | No | No | Named | |
| Retrieves all properties of the databases. | SwitchParameter | No | No | Named | |
| Includes a total count of the databases. | SwitchParameter | No | No | Named | |
| This parameter allows you to skip the first 'x' number of pages from the output and then displays the rest of the pages. | UInt64 | No | No | Named | |
| This parameter allows you to display first 'x' number of records in one page and the remaining records in the next page. | UInt64 | No | No | Named |
Microsoft PowerShell Parameters
You can use the following Microsoft PowerShell parameters:
Debug
ErrorAction
ErrorVariable
OutBuffer
OutVariable
PipelineVariable
Verbose
WarningAction
WarningVariable
Force
Confirm
WhatIf
Note: Only a few cmdlets support Force, Confirm, and WhatIf parameters.
For more information, see "About Common Parameters" in the Microsoft PowerShell documentation.
Input
This cmdlet does not support input.
Output
PSCustomObject that contains SQL database properties.
Examples
List SQL Databases Sorted By Column
The following example returns a list of SQL databases, sorted by backup size.
Get-CVSQLDatabase -SortColumn bkpSize
List SQL Databases with Paging Support
The following example returns a list of SQL databases with first 5 databases in one page, without skipping any page from the output.
Get-CVSQLDatabase -First 5 -Skip 0